HI All,
I have a DB2 table ,where one of the column is a XML file .
I have to read the column and parse it to get the value.
suggestions please
Thanks in advance
PrasannaKumar
XML Parsing
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 36
- Joined: Mon Mar 27, 2006 12:23 am
- Location: Chennai
...it's also worth noting that the XML stages support the concept of "pass thru"... meaning that any other "non-xml" column whose name exists on the input link and also the output link (but with no xpath syntax in the Description property) will be "passed - thru" the Stage without incident. So you can parse the one column and the others just come along for the ride....
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
...it's also worth noting that the XML stages support the concept of "pass thru"... meaning that any other "non-xml" column whose name exists on the input link and also the output link (but with no xpath syntax in the Description property) will be "passed - thru" the Stage without incident. So you can parse the one column and the others just come along for the ride....
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
-
- Participant
- Posts: 36
- Joined: Mon Mar 27, 2006 12:23 am
- Location: Chennai
Hi,
When i try to parse a XML file ,Which is a Column in my DB2 Table
by providing the XPath in the XML InputStage , iam getting an error
'XML_Input_10,0: Warning: xmltest1.XML_Input_10: Xalan warning (publicId: , systemId: , line: 0, column: 0): An exception occurred! Type:RuntimeException, Message:Warning: The primary document entity could not be opened. Id=TransactionDetails.xsd'
Please advice.
Thanks in advance
When i try to parse a XML file ,Which is a Column in my DB2 Table
by providing the XPath in the XML InputStage , iam getting an error
'XML_Input_10,0: Warning: xmltest1.XML_Input_10: Xalan warning (publicId: , systemId: , line: 0, column: 0): An exception occurred! Type:RuntimeException, Message:Warning: The primary document entity could not be opened. Id=TransactionDetails.xsd'
Please advice.
Thanks in advance
Take a look at the document closely...it probably has a SchemaLocation or xsi:noNameSpaceSchemaLocation= attribute inside the header. This is the xml schema for the document....the stage is looking for it. Is the document in the database table already validated? If so, just pass the column string into a Transformer before the XMLStage and use some string functions to remove the attribute entirely.
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
A good discussion...probably should be a new thread....but the XML Schema can be used to bring in meta data for a given document (you can import a schema or an xml instance document itself to garner column names).... and then afterwards, you have an option to use the XML Schema to perform in-line validation.....
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>