Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
param75
Contributor III

DataMapper - JSON -> XML - Add a colon in XML tag

Hello everyone,
Today i want to generate an XML file from a JSON.
I already generate XML files but I here I want to generate a particular one, this is an XML in google format.
Like this:
<entry>
<g:id>114778689</g:id>
<g:title>My PRODUCT</g:title>
</entry>

My problem is the colon because on STUDIO it is prohibit to add a colon( : ) in an XML tag. 
Has anyone had a solution to work this in mapping?
Actual, the only solution is to make a replacement after file generation (not good).

Thank's for your help !
Labels (4)
3 Replies
Anonymous
Not applicable

Hello,

Could you please post your trouble screenshot on forum? What is talend build version are you using?

Best regards

Sabrina

Anonymous
Not applicable

Hi, 

 

You have to declare a namespace.

 

You can create a XML structure importing this file:

<entry xmlns:g="http://www.w3.org/TR/html4/">
<g:id>114778689</g:id>
<g:title>My PRODUCT</g:title>
</entry>

 

Then you get:

Capture.PNG

Regards.

 

Eric

Anonymous
Not applicable


@eric44 wrote:

Hi, 

 

You have to declare a namespace.

 

You can create a XML structure importing this file:

<entry xmlns:g="https://theessayservice.org/buy-term-paper/">
<g:id>114778689</g:id>
<g:title>My PRODUCT</g:title>
</entry>

 

Then you get:

0683p000009Lwgt.png

 


Oh, I see now. Without importing that file it won't working... Thanks a lot!