Posted: Mon Dec 19, 2016 2:59 am Post subject: CDATA Section
Apprentice
Joined: 10 Jan 2007 Posts: 27
Hi,
how can I obtain an Output XML with a CDAta Section included in a output field?
I have written this sentences:
DECLARE MSG_BLOB BLOB ASBITSTREAM(InputRoot.XML,InputRoot.Properties.Encoding,InputRoot.Properties.CodedCharSetId);
DECLARE MSG_CHAR CHAR CAST(MSG_BLOB AS CHAR CCSID InputRoot.Properties.CodedCharSetId);
SET OutputRoot.XMLNSC.Mensaje.(XMLNSC.CDataField)CONTENT_FILE = MSG_CHAR;
The problem is that the Input XML has the info that I have to include in the CDATA Section not in the root, but inside a field. So I can't use InputRoot.XML. I have tried to write InputRoot.XML.Message.Field but it doesn't work.
Posted: Mon Dec 19, 2016 6:15 am Post subject: Re: CDATA Section
Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
uliss wrote:
The problem is that the Input XML has the info that I have to include in the CDATA Section not in the root, but inside a field. So I can't use InputRoot.XML. I have tried to write InputRoot.XML.Message.Field but it doesn't work.
Why InputRoot.XML not InputRoot.XMLNSC?
What about it "doesn't work"? Badly formed XML because the XML in the CData isn't escaped? A null field? Monkeys flying out of the back of your server?
What does the user trace say is happening? _________________ Honesty is the best policy.
Insanity is the best defence.
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