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

One Star

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 !
Moderator

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

Hello,

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

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Nine Stars

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

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

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.