Parse XML data into tabular records

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
srai
Participant
Posts: 101
Joined: Wed Feb 09, 2005 10:50 pm

Parse XML data into tabular records

Post by srai »

Hi All,

I have a XMLoutput file which contains the data returned from a web service operation. Now my requirement is to parse XMl data in tabular record and insert into a sequential file.

I tried implementing this using XMLinput Stage but I am getting following errors-

"The name '{0}' is not a valid NCName.
expression = '/:WebResponse/:WebResult' Remaining tokens are: ('/')".


I searched this error in forum and came to know that some patch need to be installed.

I just wanted to know is there any work around of this issue. Can we implement it without XML input stage.
sima79
Premium Member
Premium Member
Posts: 38
Joined: Mon Jul 16, 2007 8:12 am
Location: Melbourne, Australia

Post by sima79 »

You could write the XML data to a temporary file and parse using Perl, Java, C++ application to extract the data you need. But why go to that much trouble. Just obtain the patch from IBM support so you can use the XML input stage.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Your other workaround would be to pass the xml string thru a transformer and remove all the namespaces entirely...that is where the core of this issue is.....but you may still run into things....get the patch.
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply