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 IndexWebSphere Message Broker (ACE) SupportCDATA in XMLNSC message

Post new topicReply to topic
CDATA in XMLNSC message View previous topic :: View next topic
Author Message
MrSmith
PostPosted: Fri Nov 11, 2011 10:44 am Post subject: CDATA in XMLNSC message Reply with quote

Master

Joined: 20 Mar 2008
Posts: 215

I have tried various options but am getting nowhere fast

I want the value to be surrounded with a CDATA so what would i need to change on this statement please

This is the end result required

<field name="ProductDesc" type="VARCHAR">MR & MRS SMITH HANDBAGS</field>

so i have the code
Code:
            
CREATE LASTCHILD OF insertionRef TYPE Name NAME 'field';
-- Set the name XML attribute
SET insertionRef.field[<].(XMLNSC.Attribute)name = name;
-- Set the type XML attribute
SET insertionRef.field[<].(XMLNSC.Attribute)type = type;


where name equates to ProductDesc

and type equates to VARCHAR

but I Want the value enclosed in CDATA

I have tried

Code:
SET insertionRef.(XMLNSC.CDataField)field[<] VALUE = valueRef;


and

Code:
SET insertionRef.field[<].(XMLNSC.CDataField) = valueRef;


neither which achieves this

and do not know how you would do it if you did it as a CREATE statement

or maybe i just having a thick moment

Thx
_________________
-------- *
“Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.”
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Nov 11, 2011 12:35 pm Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Apparently a very thick moment.
You forgot that before inserting it into the CDATA field you had to serialize it using ASBITSTREAM
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
MrSmith
PostPosted: Fri Nov 11, 2011 2:36 pm Post subject: Reply with quote

Master

Joined: 20 Mar 2008
Posts: 215

Aha yes quite - there you go said it was thick moment - been a long day

Thx
_________________
-------- *
“Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.”
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sat Nov 12, 2011 6:08 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You shouldn't need to ASBITSTREAM if valueRef is already a character variable.

You might possibly have had to
Code:
SET insertionRef.(XMLNSC.CDataField)field[<]  = FIELDVALUE(valueRef);
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportCDATA in XMLNSC message
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.