
Anonymous
Not applicable
2011-07-27
11:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
373 Views
3 Replies

Anonymous
Not applicable
2011-07-27
12:28 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I switched to tExtractXMLField and it worked. Still wondering why above approach failed.
373 Views

Anonymous
Not applicable
2011-07-28
07:30 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
You may have encountered a bug that will be fixed in 4.2.3.
http://www.talendforge.org/bugs/view.php?id=22500
-Carl
373 Views

Anonymous
Not applicable
2014-02-14
08:36 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From another post, I found tConvertType which did exactly what I was looking for here!
373 Views
