Page 1 of 1

parsing XML column to dataset

Posted: Thu Mar 10, 2011 4:42 am
by rockgul88
I tried to parse an XMLtype input column from an Oracle table to a datset....
The input column name is XML_STRING_TEXT which contains the following XML content...

"<?xml version="1.0" encoding="UTF-8" ?>
- <application>
<registrationCategory>Account for Child</registrationCategory>
<code>55</code>
<description>Coverdell</description>
- </application>"


I use the following flow:
Oracle stage->XML input->Dataset

The job is running fine...But no data is moving from XML input to Dataset..
A warning message is coming as below,

XML_Input_29,0: Warning: dsj_ProSurv_Dat_WIP1.XML_Input_29: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 2): Expected an element name

please help on this issue....

Posted: Thu Mar 10, 2011 6:15 am
by eostic
First...make sure you can just retrieve the xml column and put it in a sequential file. Once you are certain that works effectively, correctly retreiving the entire document, move forward.

Sounds like you are doing validation (check box). Don't. Not for initial testing anyway. Get things working first.

How did you do the import of your metadata? Did you have an xsd? If not, but best alternative is to import the metadata from the document you wrote to disk in step 1 up above [import...table definitions....xml definitions...and then specifically check only the lowest/deepest "inside" check box for the elements and attributes that you care about in the tree].

Ernie

Posted: Thu Mar 10, 2011 6:53 am
by rockgul88
Ya i checked that also...i am able to tetrieve the full XML doc in a sequential file directly....

I have also imported the metadata of the XML through the import->table definitions->XML table definitions and then i have given 'Auto Check' then saved it....

But still i am getting the same error.... :(

Posted: Thu Mar 10, 2011 7:54 am
by chulett
Note that Ernie did not mention anything about 'Auto Check'... suggest you re-import the metadata as he suggested to see if that helps.

Posted: Thu Mar 10, 2011 8:24 am
by eostic
Reading it again, it might also be that there is some odd characters or other data causing issues.

Make absolutely sure that you can open the resulting document (from step 1) perfectly inside of IE or firefox without error, and/or consider checking it's well-formed-ness on the web at the w3.org site for xml or any other web based validator (just search google for something like "xml well formed test" or "xml validation")....

Ernie

Posted: Thu Mar 10, 2011 11:31 pm
by rockgul88
Ya i checked in IE..there is no exception in XML file...

:(

Posted: Fri Mar 11, 2011 6:57 am
by eostic
Just to be sure...eliminate Oracle from the picture. Simplest is to just write a quick test Server Job using Folder to send the xml to your xmlInput Stage. See if it gets the same error as your Oracle-to-XML EE Job.

Ernie

...if you haven't used Server Jobs for XML, create a Server job that has Folder---XML---Transformer----Sequential. Load the "Folder" Stage Table def (it is in the Built-in category of table definitions) into the link from the Folder Stage, and point the folder stage properties to the directory (Stage Level) and Filename (link level) for your test xml document. Then your xmlInput Stage will look just about the same, gteting the content from the Folder Stage instead of Oracle....

Let us know what happens. I find that Server sometimes yields more informative errors.

Ernie