XML parsing

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
shrey3a
Premium Member
Premium Member
Posts: 234
Joined: Sun Nov 21, 2004 10:41 pm

XML parsing

Post by shrey3a »

Hi,

I have XML string as input, Every string format is different i.e. I want to parse the haeder first and then the col tags.

I'm able to parse the xml header which has table name and do not want to parse the data field i.e. I want all fields to remail in tags as I want to parse it in later stage on basis of table name.

/msg/trans/insertRow/@srcName --- this is my header and I get the table name correctly.

/msg/trans/insertRow/col/*/text() -- this has corresponding tags for all the columns for particular Table in message.

Right now I'm getting the data in 2nd column as a string but no tags...i want to either get the data as tags or just want to carry the whole XML string which was my input as it is with the first column parsed so I can parse it later.

Thanks,
Post Reply