Author |
Message
|
rkford11 |
Posted: Fri Dec 17, 2004 4:16 pm Post subject: xml to name value pairs |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
I have my input xml as
<Test>
<Test1> ABC </Test1>
<Test2> XYZ </Test2>
<Test>.
I want my o/p to be in name value pairs i.e
Test1 = ABC
Test2 = XYZ
Is this possible using WMQI.
Thanks |
|
Back to top |
|
 |
vennela |
Posted: Fri Dec 17, 2004 4:32 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Yes
That is what I guess is called XML to MRM conversion. |
|
Back to top |
|
 |
rkford11 |
Posted: Fri Dec 17, 2004 5:23 pm Post subject: |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
vennela wrote: |
Yes
That is what I guess is called XML to MRM conversion. |
Thanks Vennela.i have set my ESQL as
SET OutputRoot.MRM.Test1 = InputRoot.XML.Test.Test1
SET OutputRoot.MRM.Test2 = InputRoot.XML.Test.Test2
But i am not receiving the o/p. please let me know where i am making the mistake.
Thanks |
|
Back to top |
|
 |
kirani |
Posted: Fri Dec 17, 2004 5:32 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You can either model your message using CWF (if fixed length) or TDS (tagged/delimited) format. Please take a look a some of the redbooks that will explain this with an example. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
kimbert |
Posted: Mon Dec 20, 2004 4:20 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Just parse the input message in the MRM domain, using an XML physical format. The MRM always builds trees with name-value pairs where possible. |
|
Back to top |
|
 |
rkford11 |
Posted: Mon Dec 20, 2004 6:48 am Post subject: |
|
|
Partisan
Joined: 06 Jun 2004 Posts: 316
|
kimbert wrote: |
Just parse the input message in the MRM domain, using an XML physical format. The MRM always builds trees with name-value pairs where possible. |
Kimbert, can you please provide more information on this statement.
Thanks |
|
Back to top |
|
 |
kimbert |
Posted: Tue Jan 04, 2005 4:10 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
In v5.0, you can parse XML messages in three different ways:
- in XML domain
- in XMLNS domain (same as XML domain, but it is namespace-aware)
- in the MRM domain, using the MRM-XML parser
To parse an XML message in the MRM domain, you need to
1. create a message set which describes your input message(s)
2. Add an XML physical format
3. Create message definitions for your input message(s) using the Message Brokers Toolkit
4. Set the message properties of the input message as follows:
- Domain = 'MRM'
- Message Set = Exact name of your message set
- Message Type = Name of message definition within the message set
- Message Format = The name of the XML physical format
You can skip step 3 if you really want to, because XML is self-describing. |
|
Back to top |
|
 |
|