Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
param75
Contributor III
Contributor III

Talend Data Mapper - THMap Include CDATA to XML File

Hi everyone,
I created a mapping with tHMap component for create an XML file from a JSON file.
My XML file is correctly generated but I don't know how to add the CDATA (" <!]>") in some tags. I tried to add a constant(function) in my Map in left/rigth data but Talend replaces the character " <" by " &gt;"
Also, I tried to add CDATA in the initiator/terminator but visibly it only works for the flat files.
How do I add this CDATA to my fields?
Thank's all for your help !
Labels (4)
3 Replies
Anonymous
Not applicable

Hi,
I'm afraid there is nothing planned for it in TDM but you should open a case (I would be interested in the answer).
I can suggest a workaround with a tReplace just after your tHmap:
0683p000009MD8n.png
Regards.
Eric
param75
Contributor III
Contributor III
Author

Hi Eric and thank's for your reply,
The problem is with the "Constant" function in the mapping.
There are others character as " &" -> " &amp;"
I have to build urls with this character, it's strange that it is not possible. If I have to do post mapping replacements on millions of lines, the performance will be declining.
Someone would have another solution?
Thank's!
param75
Contributor III
Contributor III
Author

The problem is corrected. I created my XML documents without the CDATA but with the correct encode.
Thank's.