|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WBIMB: deserialize CDATA element that contains a XML message |
« View previous topic :: View next topic » |
Author |
Message
|
Herbert |
Posted: Tue Oct 16, 2007 1:57 am Post subject: WBIMB: deserialize CDATA element that contains a XML message |
|
|
 Centurion
Joined: 05 Dec 2006 Posts: 146 Location: Leersum, The Netherlands
|
Hi,
I want to deserialize in ESQL a XML element that contains (as CDATA) a complete XML message into a tree.
I have tried a lot of options for the ASBITSTREAM and PARSE functions, however it is not working for me.
Is there a example for this somewhere?
Kind Regards, Herbert |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 16, 2007 2:07 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
ASBITSTREAM has nothing to do with deserialization/unmarshalling/parsing.
You need to create a field that is associated with an XMLNS or XMLNSC domain, and parse the CDATA content.
An example from the ESQL reference on the CREATE statement
Code: |
DECLARE inCCSID INT InputProperties.CodedCharSetId;
DECLARE inEncoding INT InputProperties.Encoding;
DECLARE inBitstream BLOB ASBITSTREAM(InputRoot.XMLNSC, inEncoding, inCCSID);
CREATE LASTCHILD OF OutputRoot DOMAIN('MRM')
PARSE(inBitStream, inEncoding, inCCSID, 'DP3UK14002001',
'TestCase', 'XML1', options); |
you would replace 'MRM' in the domain clause with 'XMLNS' or 'XMLNSC' and inBitstream with a pointer to your CDATA data. And you only need the CREATE statement from that. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Herbert |
Posted: Tue Oct 16, 2007 10:26 pm Post subject: |
|
|
 Centurion
Joined: 05 Dec 2006 Posts: 146 Location: Leersum, The Netherlands
|
jefflowrey wrote: |
ASBITSTREAM has nothing to do with deserialization/unmarshalling/parsing.
You need to create a field that is associated with an XMLNS or XMLNSC domain, and parse the CDATA content. |
indeed, it was not working because of a stupid typo, thanks for your reply. |
|
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
|
|
|
|