Page 1 of 1

XML parsing

Posted: Thu May 08, 2008 9:36 am
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,