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 » Reading CDATA element with namespaces

Post new topic  Reply to topic
 Reading CDATA element with namespaces « View previous topic :: View next topic » 
Author Message
dilse
PostPosted: Tue Nov 08, 2011 12:46 pm    Post subject: Reading CDATA element with namespaces Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Hi guys,
Message Broker version 7.0.0.2.


I have an XML with the following structure.

Code:

<ns:Name xmlns:ns="http://www.example.org/Test">>
<ns:firstName>JOHN</ns:firstName>
<ns:lastName>DOE</ns:lastName>
<ns:address><![CDATA[<Address>
<StName>123 MAIN ST</StName>
<City>WORLD</City>
</Address>
]]></ns:address>
</ns:Name>


I am trying to get the CDATA field value in the compute node but I am having no luck.

Following are the ESQL statement that i tried but with no luck. But I was able to get the data file if the incoming XML doesnt have namespaces.

Code:

CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC')
PARSE(InputRoot.XMLNSC.*:Name.Cdata.*:address);


I also tried the following but no luck.
Code:

CREATE LASTCHILD OF OutputRoot DOMAIN('XMLNSC')
PARSE(InputRoot.XMLNSC.*:Name.*:address);


Following is the Exception:
Code:

Insert
         Type:INTEGER:5
         Text:CHARACTER:CREATE LASTCHILD OF OutputRoot DOMAIN 'XMLNSC' PARSE(InputRoot.XMLNSC.*:Name.Cdata.*:address);
RecoverableException
          File:CHARACTER:F:\build\S700_P\src\DataFlowEngine\ImbRdl\ImbRdlTreeStatements.cpp
           Line:INTEGER:177      Function:CHARACTER:SqlCreateFieldStatement::execute
   Type:CHARACTER:ComIbmComputeNode
                 Name:CHARACTER:TEST_PROCESS#FCMComposite_1_2
   Label:CHARACTER:TEST_PROCESS.Compute
   Catalog:CHARACTER:BIPmsgs
   Severity:INTEGER:3
   Number:INTEGER:2906
   Text:CHARACTER:
   Insert
                        Type:INTEGER:5
           Text:CHARACTER:.TEST_PROCESS_Compute.Main
   Insert
           Type:INTEGER:5
           Text:CHARACTER:10.3
   Insert
           Type:INTEGER:5
           Text:CHARACTER:NULL
   Insert
           Type:INTEGER:5
           Text:CHARACTER:BITSTREAM
   Insert
           Type:INTEGER:5
           Text:CHARACTER:CREATE
   Insert
          Type:INTEGER:5
          Text:CHARACTER:CHARACTER, BIT, BLOB
   Insert
          Type:INTEGER:5
          Text:CHARACTER:NULL


Any idea is appreciated.[/code]
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Nov 08, 2011 12:59 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Type 'XMLNSC CDATA' into the info center. It's all explained there.
Back to top
View user's profile Send private message
dilse
PostPosted: Wed Nov 09, 2011 7:54 am    Post subject: Reply with quote

Master

Joined: 24 Jun 2004
Posts: 270

Thanks kimbert. I already went through the documentation before I posted this but I did not have any luck with finding the documentation regarding the readign of CDATA elements involving namespaces anywhere.


Any pointers are appreciated...
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Nov 09, 2011 8:15 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

This is not about namespaces - it's about understand what the message tree looks like, and how to access fields in it. I don't want to sound like a gramophone with the needle stuck, but...I suggest that you put in a Trace node and take a user trace. I'm almost certain that you will find the problem by doing that.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Nov 09, 2011 8:35 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

kimbert wrote:
This is not about namespaces - it's about understand what the message tree looks like, and how to access fields in it. I don't want to sound like a gramophone with the needle stuck, but...I suggest that you put in a Trace node and take a user trace. I'm almost certain that you will find the problem by doing that.


A.K.A known as 'Kimbert's 2nd rule'...
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
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 » Reading CDATA element with namespaces
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.