One Star

How to convert String to xml Document

Hi,
Trying to parse database varchar column as XML document, here what I did
1. in tMap, convert string column to Document by calling ParseUtils.parseTo_Document(xmlString)
2. in tXMLMap, use metadata xml defintion and map the xml elements/attributes to output columns.
The job compiles OK. but the columns all come out null. I try the same xml as file, the tFileInputXML parse the column correctly.
Am I missing any step?
I am using TOS 4.2.1
3 REPLIES
One Star

Re: How to convert String to xml Document

I switched to tExtractXMLField and it worked. Still wondering why above approach failed.
One Star

Re: How to convert String to xml Document

Hi,
You may have encountered a bug that will be fixed in 4.2.3.
http://www.talendforge.org/bugs/view.php?id=22500
-Carl
One Star

Re: How to convert String to xml Document

From another post, I found tConvertType which did exactly what I was looking for here!