CDATA, how to retrieve xml???

Highlighted
One Star

CDATA, how to retrieve xml???

I am new to Talend and I have been struggling with a response message where the entire xml message has been wrapped by a CDATA tag.
Is there a component in Talend that I can use or do I need to write some java to get down to the xml tags within the message??
Any assistance would be greatly appreciated!
Moderator

Re: CDATA, how to retrieve xml???

Hi,
Please see a related forum http://www.talendforge.org/forum/viewtopic.php?id=30978
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.
One Star

Re: CDATA, how to retrieve xml???

Thanks Sabrina, I've already looked at the post you are referring to and tried using tFileInputRegex but was unsuccessful.
Because my response message I'm receiving is wrapped entirely by CDATA, I'm not sure what is the best output method.
Schema for the response message is defined as one large string.  If I set my output as XML, I'm getting some extra lines added (xml version, root, row).
If I set my output to CSV, the data looks more useable, but I don't know how to have this data behave more like xml.
I've attached the two output files for comparison.
LMSoutxml.txt.txtLMSoutcsv.txt.txt

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

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

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch