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: 
raspati
Contributor

Adding tag <![CDATA[ to XML

Hi Team,

I have a development talend that require to adding tag <![CDATA[ in the middle of XML data.

  • The following is the schema :

tDBInput >> tMap >> tAdvancedfileOutputXML >> tesbconsumer

  • Sample of XML tag as follow:

<tag-A>

<![CDATA[

<tag-B></tag-B>

<tag-C></tag-C>

]]>

</tag-A>

Regards,

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

@Ilham Raspati​, it is impossible to add tag <![CDATA[ on tAdvancedfileOutputXML, here is a workaround using tReaplce after the XML file is generated.

0693p00000AGtQEAA1.png0693p00000AGtQDAA1.png0693p00000AGtQ8AAL.png 

Hope it helps you.

 

Regards

Shong

View solution in original post

6 Replies
Anonymous
Not applicable

@Ilham Raspati​, it is impossible to add tag <![CDATA[ on tAdvancedfileOutputXML, here is a workaround using tReaplce after the XML file is generated.

0693p00000AGtQEAA1.png0693p00000AGtQDAA1.png0693p00000AGtQ8AAL.png 

Hope it helps you.

 

Regards

Shong

raspati
Contributor
Author

Hi Shong,

 

I really appreciate your help and provide me a screen capture with complete workflow.

 

I will try it, and back to you.

 

Regards,

 

Regards,

raspati
Contributor
Author

Hi Shong,

 

I trying on my own, the schema as follow: 

 

0693p00000AH3bBAAT.jpg 

But, output from tFileOutputDelimited is blank.

 

Then I trying to reset all setting on tReplace, the result still same.

Anonymous
Not applicable

@Ilham Raspati​ , we usually use tLogRow to print the data on the console for testing, try to test if you have expected output after each component.

 

raspati
Contributor
Author

Hi Shong,

 

The following is output for each tlog.

 

Is there any miss configuration ?

 

0693p00000AH3eAAAT.jpg 

Regards,

raspati
Contributor
Author

Hi Shong,

 

Now it's works!

 

I found schema on tReplace on right side is none. So I added new and change from object to String.

 

Thank you for your help!!

 

Regards.