Author |
Message
|
paranoid221 |
Posted: Mon Oct 13, 2008 1:29 pm Post subject: XMLNSC.CDATA |
|
|
 Centurion
Joined: 03 Apr 2006 Posts: 101 Location: USA
|
A quick question about CDATA field.
When I say OutputRoot.XMLNSC.MyRoot.(XMLNSC.CDataField) = CAST(InputRoot."BLOB"."BLOB" AS CHARACTER CCSID InputRoot.Properties.CodedCharSetId)
I get the following message in the output queue
<MyRoot>
<><![CDATA[ **** ALL MY DATA GOES ***** HERE ]]></>
</MyRoot>
My question here is, why am I seeing the orphaned tags <> and </>?
Is there anyway to get rid of them without having to use the REPLACE function in ESQL? _________________ LIFE is a series of complex calculations, somewhere multiplied by ZERO. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Oct 13, 2008 1:42 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Because you aren't naming the CDATA element. |
|
Back to top |
|
 |
elvis_gn |
Posted: Mon Oct 13, 2008 8:08 pm Post subject: Re: XMLNSC.CDATA |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi paranoid221,
What mqjeff meant is
paranoid221 wrote: |
OutputRoot.XMLNSC.MyRoot.(XMLNSC.CDataField) = CAST(InputRoot."BLOB"."BLOB" AS CHARACTER CCSID InputRoot.Properties.CodedCharSetId)
I get the following message in the output queue
<MyRoot>
<><![CDATA[ **** ALL MY DATA GOES ***** HERE ]]></>
</MyRoot> |
Code: |
OutputRoot.XMLNSC.MyRoot.(XMLNSC.CDataField)paranoid221 = CAST(InputRoot."BLOB"."BLOB" AS CHARACTER CCSID InputRoot.Properties.CodedCharSetId) |
Will give you
<paranoid221><![CDATA[ **** ALL MY DATA GOES ***** HERE ]]><paranoid221/>
</MyRoot>
So if you don't want the tags, create the MyRoot as CDATA.
Regards. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Oct 14, 2008 2:02 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
This is a common error. When you create a field in the message tree, you are setting four things. You may not realize that you are doing it, though.
The four things are:
- name
- namespace
- value
- field type
Your statement was creating a child element under MyRoot and only setting its field type. What you intended to do was to set the field type of MyRoot.
[edit]You are actually seting two things - the field type and the value. And implicitly setting the name/namespace to "". ~Thanks to mqjeff for pointing that out [/edit] |
|
Back to top |
|
 |
paranoid221 |
Posted: Tue Oct 14, 2008 10:13 pm Post subject: |
|
|
 Centurion
Joined: 03 Apr 2006 Posts: 101 Location: USA
|
All resolved now. Thank u guys for the quick responses.
I should have tried other options when it didnot work the way I wanted to.
Shame on me for giving up so early and deciding to post the question here.  _________________ LIFE is a series of complex calculations, somewhere multiplied by ZERO. |
|
Back to top |
|
 |
|