Gurus,
Is there a way to parse XML tag from xml message i.e. without removing the tags.
<msg <othertags
<insert <col>........ </insert>
<insert <col>........ </insert>
<insert <col>........ </insert>
<insert <col>........ </insert>
</other tgs></msg>
I need o/p as
<insert <col>........ </insert>
<insert <col>........ </insert>
I need to use the XML stage as I'm parsing some other tags in same message but need to take insert tag as it is.
Regards,
Munish
XML parsing
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 299
- Joined: Wed Nov 13, 2002 5:38 pm
- Location: USA
If the "insert" XPATH can be defined then it can be parsed from the rest and output as an xml fragment. In your example you could define a column with this XPATH in the description:
/msg/insert
You will probably need to define it as a repetition element as well which means it will need to have it's own output link from the XMLInput stage. Add the other key fields so that you can tie these inserts with the rest of the message down the road and you're good to go.
/msg/insert
You will probably need to define it as a repetition element as well which means it will need to have it's own output link from the XMLInput stage. Add the other key fields so that you can tie these inserts with the rest of the message down the road and you're good to go.
...it is also likely that you will need patch 117664, which corrected an anomaly with reads of partial xml "chunks". You'll know if you need it if your "insert" set of tags gets parsed out of the larger document, but no longer has it's tag characters (< and />). ...also, I've noticed that sometimes I need the final "/" --- so add that to the xpath above if you have problems.
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>