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: 
RA6
Creator

Escape Special Characters - XML

In my tmap, i am concatenating some txmlmap, it appears correctly in the tlog but not in xml file generated : 

 

Expression builder where i am concatenating the xml with type "List":

0683p000009Lqq2.png

 

Displaying correctly in tlog :

 

0683p000009Lr6M.png

 

Xml file generated : 

 

0683p000009Lr6W.png

 

Is there a way to use the escape special characters?

 

Can someone advice or help me out?

 

Thank you.

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable

This looks like you are trying to insert XML within an XML structure (possibly within a tMap?). The problem you have here is that the tMap will interpret the String XML you are creating as a String. It is quite rightly escaping the content so that it will not break the XML structure you are inserting it into.

 

What you can do to get round this is to put a value to replace (maybe something like "**REPLACE**") into the XML field where you want to insert the XML you are writing as a String. Once the main XML is built, use a tConvertType component to convert the XML Document to a String. Then use String replace functionality to replace the "**REPLACE**" value with your String XML. The (after removing the XML Header) use a tConvertType component to convert the modified String XML to an XML Document.

 

It is a bit fiddly, but works quite effectively if you want to add XML sections to an existing XML document. 

 

View solution in original post

1 Reply
Anonymous
Not applicable

This looks like you are trying to insert XML within an XML structure (possibly within a tMap?). The problem you have here is that the tMap will interpret the String XML you are creating as a String. It is quite rightly escaping the content so that it will not break the XML structure you are inserting it into.

 

What you can do to get round this is to put a value to replace (maybe something like "**REPLACE**") into the XML field where you want to insert the XML you are writing as a String. Once the main XML is built, use a tConvertType component to convert the XML Document to a String. Then use String replace functionality to replace the "**REPLACE**" value with your String XML. The (after removing the XML Header) use a tConvertType component to convert the modified String XML to an XML Document.

 

It is a bit fiddly, but works quite effectively if you want to add XML sections to an existing XML document.