|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Parsing of no xml message |
« View previous topic :: View next topic » |
Author |
Message
|
prasannal |
Posted: Fri Aug 27, 2004 2:37 am Post subject: Parsing of no xml message |
|
|
Apprentice
Joined: 04 Aug 2003 Posts: 44
|
Hi,
I have a data which can be described as :
- divided into small sections, each section will have a unique key
- there is no fixed order of these sections
- depending on key value, each section data has to be parsed
the structure of section is defined.
How we can parse such message within MQSI2.1 or later versions?
Let me know suggestions on such kind of messages.
Thanks,
Prasanna |
|
Back to top |
|
 |
PGoodhart |
Posted: Fri Aug 27, 2004 4:45 am Post subject: |
|
|
Master
Joined: 17 Jun 2004 Posts: 278 Location: Harrisburg PA
|
Boy, did you pick a fun challenge. I take it that XML is out per your title? Because that would really be the most appropriate. If your end point can't handle XML, you would be best starting with XML, and in the broker you could convert the one XML message to several fixed length messages to handle the repeating/unknown nature of the orginal message...
Or you could build your own parser (which is a major undertaking).
There are some very bright people around so they may come up with another workable idea. _________________ Patrick Goodhart
MQ Admin/Web Developer/Consultant
WebSphere Application Server Admin |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 27, 2004 5:20 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
This seems like a classic case for Tagged Fixed Length modeling, using the TDS physical layer.
Each of your sections is modelled as a complex type. That type defines all the sub elements.
Your message is modelled as a complex type. That type contains a single, repeating element. That single repeating element is of a complex type that is a choice, containing elements of each of your sections. Each of those elements has a tag defined in it's properties to identify the element.
So, MessageChoiceElement(unlimited repeat)- Section1 element
- Section 2 element
- ...
_________________ I am *not* the model of the modern major general. |
|
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
|
|
|
|