ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Converting CDATA format back to XML structure

Post new topic  Reply to topic
 Converting CDATA format back to XML structure « View previous topic :: View next topic » 
Author Message
burman.abhishek
PostPosted: Thu Feb 01, 2007 10:11 pm    Post subject: Converting CDATA format back to XML structure Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Fri Feb 02, 2007 2:52 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

create field .. parse..
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
burman.abhishek
PostPosted: Wed Feb 07, 2007 9:28 am    Post subject: Reply with quote

Apprentice

Joined: 23 Aug 2006
Posts: 37

example ?
_________________
With warm Regards,

Burman
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 07, 2007 9:53 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes, there are plenty of examples in the forum.

http://www.mqseries.net/phpBB2/viewtopic.php?t=34935 for instance.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
burman.abhishek
PostPosted: Thu Feb 08, 2007 9:49 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Feb 08, 2007 10:09 am    Post subject: Reply with quote

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
View user's profile Send private message
wmqiadmin
PostPosted: Mon Mar 05, 2007 8:33 am    Post subject: Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Mon Mar 05, 2007 3:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Converting CDATA format back to XML structure
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.