|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
XML and non XML in msg |
« View previous topic :: View next topic » |
Author |
Message
|
francoisvdm |
Posted: Mon Apr 10, 2006 3:11 am Post subject: XML and non XML in msg |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
I'm receiving a msg with some text in the beginning, followed by a valid XML. Two scenarios:
1.If I know the length of the non XML portion before the XML portion, how do I strip it out and only pass the XML on to the rest of the msg flow?
2. If I do NOT know the length of the non XML portion, how do I do the same as above?
Thanks _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Apr 10, 2006 3:16 am Post subject: Re: XML and non XML in msg |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Francoisvdm wrote: |
I'm receiving a msg with some text in the beginning, followed by a valid XML. Two scenarios:
1.If I know the length of the non XML portion before the XML portion, how do I strip it out and only pass the XML on to the rest of the msg flow? |
First, receive the message as BLOB.
Second, use SUBSTRING to remove the non-xml portion.
Francoisvdm wrote: |
2. If I do NOT know the length of the non XML portion, how do I do the same as above? |
First, receive the message as BLOB.
Second, use POSITION to find the start of the XML, possibly looking for "<?xml".
Third, use SUBSTRING to remove the non-xml portion.
FOURTH, use an RCD node to establish that the data is now XML. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Mon Apr 10, 2006 3:16 am Post subject: Re: XML and non XML in msg |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Francoisvdm wrote: |
1.If I know the length of the non XML portion before the XML portion, how do I strip it out and only pass the XML on to the rest of the msg flow?
|
So how can you tell where the XML starts? There must be something to tell you how long the first part it, or perhaps a delimiter? (Or are you expecting the first "<" to be the delimiter?) _________________ -wayne |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|