Page 1 of 1

Reading xml files

Posted: Mon Jun 15, 2009 12:45 pm
by aluthra48
Hello
I have an xml file as follows:
<?xml version="1.0"?><QuantumViewResponse><Response><TransactionReference><CustomerContext>Test XML</CustomerContext><XpciVersion>1.0007</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription><Error><ErrorSeverity>Warning</ErrorSeverity><ErrorCode>336000</ErrorCode><ErrorDescription>The follow</ErrorDescription></Error></Response><QuantumViewEvents><SubscriberID>kschrank</SubscriberID></QuantumViewEvents></QuantumViewResponse>

The parallel job has been defined as seq file ----->xml input stage ----> peek stage. The seq file stage Output/Properties tab/Read method = specific File. Format/Record level/RecordType = implicit, Format/Field Defaults/delimiter=none, columns = single column sqltype = longnvarchar and length 9999.
When I "view data" I see 2 rows. However, if I reduce the length of the xmlfile input to less than 512 characters, I see one row.
This is just a test. In reality, I will be reading an xml file that maybe as long as 15000 characters. What am I doing wrong?

Thanks

Posted: Mon Jun 15, 2009 12:58 pm
by chulett
Don't use the Sequential File stage but rather the External Source stage as noted here in Dr Ostic's Sing-Aong Blog. :wink:

Posted: Mon Jun 15, 2009 1:24 pm
by aluthra48
Works like a charm. I going to experiment some more, and then start working on the real file rather than the test file I created.
Thank you so much