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 » Passing XML inside a XML tag using esql

Post new topic  Reply to topic
 Passing XML inside a XML tag using esql « View previous topic :: View next topic » 
Author Message
vijayakumar
PostPosted: Wed Sep 22, 2010 12:47 am    Post subject: Passing XML inside a XML tag using esql Reply with quote

Centurion

Joined: 01 Aug 2010
Posts: 101

Is it possible to pass xml inside a xml tag using esql.

For eg . I have a xml like

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Messages><name>Item</name><id>1000002500</id><payload></payload>


Inside the payload , i need to add a xml like .

<?xml version="1.0" encoding="UTF-8" standalone="yes"?
<header>stra</header><message>ItemValue</message>

How to do this ? . Please suggest me on this .
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Sep 22, 2010 1:09 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Yes - the usual approach is to enclose the embedded XML in CDATA tags.
Search the infocenter for 'CDATA XMLNSC' to see how.
Back to top
View user's profile Send private message
vijayakumar
PostPosted: Wed Sep 22, 2010 2:21 am    Post subject: Reply with quote

Centurion

Joined: 01 Aug 2010
Posts: 101

Thanks for your reply .

i need to get the output as

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Messages>
<name>Item</name>
<id>1000002500</id>
<payload>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?
<header>stra</header><message>ItemValue</message>
</payload>
</Messages? .

we can able to do it using the CDATA tags .
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Sep 22, 2010 2:34 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
i need to get the output as

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Messages>
<name>Item</name>
<id>1000002500</id>
<payload>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?
I don't think you meant to say that. It is illegal to have an XML declaration ( <?xml ... ) in the middle of an XML document.

You *need* the CDATA tags. Maybe you have got CDATA in your output, but the forum removed your CDATA tags? ( so use [code] tags around your XML - you should have used them anyway because it makes it easier to read ).
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 » Passing XML inside a XML tag using esql
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.