Author |
Message
|
burman.abhishek |
Posted: Thu Feb 01, 2007 10:11 pm Post subject: Converting CDATA format back to XML structure |
|
|
Apprentice
Joined: 23 Aug 2006 Posts: 37
|
I am getting an input field in an xml structure as CDATA. How do i convert it back to XML using ESQL.
The data looks something like this :
<![CDATA[ <ServiceOrder><SONumber>1AGHT78</SONumber><ShipToName>Burman</ShipToName><ShipToStreet>HighStreet</ShipToStreet><ShipToCity>Mumbai</ShipToCity><BillToName>Client</BillToName><Comments>HighPriority</Comments></ServiceOrder>
]]>
I need to convert it back to
<ServiceOrder>
<SONumber>1AGHT78</SONumber>
<ShipToName>Burman</ShipToName>
<ShipToStreet>HighStreet</ShipToStreet>
<ShipToCity>Mumbai</ShipToCity>
<BillToName>Client</BillToName>
<Comments>HighPriority</Comments>
</ServiceOrder>
From documentation I have understood that I have to use CDATA, but I am not getting the syntax right
Can some one please help me with it ? _________________ With warm Regards,
Burman |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Feb 02, 2007 2:52 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
create field .. parse.. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
burman.abhishek |
Posted: Wed Feb 07, 2007 9:28 am Post subject: |
|
|
Apprentice
Joined: 23 Aug 2006 Posts: 37
|
example ? _________________ With warm Regards,
Burman |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Feb 07, 2007 9:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
burman.abhishek |
Posted: Thu Feb 08, 2007 9:49 am Post subject: |
|
|
Apprentice
Joined: 23 Aug 2006 Posts: 37
|
That is the problem. All the examples shown here PARSE the incoming data against a message set. I do not have have a message set. All that i know is that the incoming data is an XML message wrapped in CDATA format. I just want to extract it back to XML. There is no requirement for the incoming message to be validated against a message set _________________ With warm Regards,
Burman |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Feb 08, 2007 10:09 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
So, specify the XMLNS domain and don't specify the message set properties.
As I'm sure the documentation for the CREATE FIELD statement indicates is entirely possible.
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wmqiadmin |
Posted: Mon Mar 05, 2007 8:33 am Post subject: |
|
|
 Disciple
Joined: 19 Jun 2005 Posts: 163 Location: epping UK
|
burman.abhishek wrote: |
That is the problem. All the examples shown here PARSE the incoming data against a message set. I do not have have a message set. All that i know is that the incoming data is an XML message wrapped in CDATA format. I just want to extract it back to XML. There is no requirement for the incoming message to be validated against a message set |
Hi Abhishek,
Can you pls put the sample code, how did you mapped the data to xml structure.
Thanks
wmqiadmin |
|
Back to top |
|
 |
kimbert |
Posted: Mon Mar 05, 2007 3:31 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You can parse XML without a message set, unless you are using the MRM domain.
If you are using XMLNS or XMLNSC, the parser never uses a message set. The ESQL editor and the mapping node can use is to make your life easier, though.
Code: |
CREATE LASTCHILD OF X PARSE Y DOMAIN 'XMLNSC'
ENCODING InputRoot.MQMD.Encoding CCSID InputRoot.MQMD.CodedCharSetId; |
|
|
Back to top |
|
 |
|