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 Index » WebSphere Message Broker (ACE) Support » CDATA converts XML attributes to elements

Post new topic  Reply to topic
 CDATA converts XML attributes to elements « View previous topic :: View next topic » 
Author Message
arkel111
PostPosted: Tue Oct 18, 2011 2:05 am    Post subject: CDATA converts XML attributes to elements Reply with quote

Newbie

Joined: 18 Oct 2011
Posts: 2

Hi, we are currently experiencing an issue, when we use (XML.CDataSection) it converts XML attributes to XML elements. Here is the code that we use:

DECLARE refData REFERENCE TO OutputRoot.XMLNS.Envelope.Body.csrSession.pwsRequest.items.statement.data.Reports;
DECLARE refCCPS CHARACTER;

SET Environment.Variables.blobCCPS = ASBITSTREAM(refData OPTIONS FolderBitStream);
SET refCCPS = CAST(Environment.Variables.blobCCPS AS CHAR CCSID 1208 );
SET OutputRoot.XMLNS.Envelope.Body.csrSession.pwsRequest.items.statement.data = NULL;
SET OutputRoot.XMLNS.Envelope.Body.csrSession.pwsRequest.items.statement.data.(XML.CDataSection) = refCCPS;

Here is the data that we want to insert to Output tree as a CDATA:

<tableList>
<table title="String" name="launchBonus" headerType="String" seq="4" id="RT1006"/>
<table title="String" name="anniversaryBonus" headerType="String" seq="5" id="RT1007"/>
...
</tableList>

however after we insert it as CData using code above it becomes this:

<tableList>
<table>
<id>RT1006</id>
<seq>4</seq>
<headerType>String</headerType>
<name>launchBonus</name>
<title>String</title>
</table>
<table>
<id>RT1007</id>
<seq>5</seq>
<headerType>String</headerType>
<name>anniversaryBonus</name>
<title>String</title>
</table>
...
</tableList>

Has anyone experienced similar issue?

I would appreciate if someone could point us to the right direction as to where are we going wrong.

Much appreciated, thanks.
Back to top
View user's profile Send private message
ruchir
PostPosted: Tue Oct 18, 2011 2:17 am    Post subject: Reply with quote

Guest




Hi,

I think this will help you :-

http://www.mqseries.net/phpBB2/viewtopic.php?t=31250
Back to top
arkel111
PostPosted: Tue Oct 18, 2011 4:27 am    Post subject: Reply with quote

Newbie

Joined: 18 Oct 2011
Posts: 2

Thanks, we have found an issue, we weren't parsing correctly.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » CDATA converts XML attributes to elements
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.