|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How To Convert an XML in String format |
« View previous topic :: View next topic » |
Author |
Message
|
SABCAS |
Posted: Wed Mar 09, 2005 5:45 am Post subject: How To Convert an XML in String format |
|
|
Acolyte
Joined: 09 Mar 2005 Posts: 60 Location: Switzerland
|
Hallo I work with ESQL, and I need to convert an XML into a String,
I mean :
<XML>
<Body>
<Data>Hallo</Data>
</Body>
</XML>
convert into "<XML><Body><Data>Hallo</Data></Body></XML>"
I have tried to use BLOB but I got several Problems.
Thanks in advance for the Help |
|
Back to top |
|
 |
JT |
Posted: Wed Mar 09, 2005 7:19 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Code: |
DECLARE myString CHARACTER CAST(ASBITSTREAM(InputRoot.XML OPTIONS RootBitStream) AS CHARACTER CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding); |
According to the XML message you posted, this code will convert your message starting at the parent tag 'XML' to a string. |
|
Back to top |
|
 |
vennela |
Posted: Wed Mar 09, 2005 9:46 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Exactly from the requirements, it is like removing line feeds from the the xml message right? |
|
Back to top |
|
 |
SABCAS |
Posted: Wed Mar 09, 2005 10:16 pm Post subject: |
|
|
Acolyte
Joined: 09 Mar 2005 Posts: 60 Location: Switzerland
|
Great ! It's working.
Thanks a lot !!  |
|
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
|
|
|
|