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 » Question on Reading XML CDATA Structure

Post new topic  Reply to topic
 Question on Reading XML CDATA Structure « View previous topic :: View next topic » 
Author Message
jorro004
PostPosted: Sat Aug 25, 2007 10:00 pm    Post subject: Question on Reading XML CDATA Structure Reply with quote

Acolyte

Joined: 25 Aug 2007
Posts: 50

Hi Masters,

Could you please advise on how can I use or code ESQL to extract XML Elements from CDATA Structure.Because from ESQL I couldnt extract just the XML Message from CDATA whereas it reads entire XML Structure from XML which I dont need.

Some thing like

<! CDATA
[
<? XML Vers
<!Doctyp...
<Message>

</Message>
]]


How can I access Message Element from CDATA sturcture please using ESQL?

Thanks in Advance
-Learner(Everything starts from Single Step to reach a MILE Stone )
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Aug 26, 2007 7:11 am    Post subject: Reply with quote

Grand High Poobah

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

Easy: Parse the whole CDATA section into the Environment.
You can then walk the tree and find what you need.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jorro004
PostPosted: Mon Aug 27, 2007 9:35 am    Post subject: Reply with quote

Acolyte

Joined: 25 Aug 2007
Posts: 50

Thanks for the reply,

After Parsing, The CData elements were not read individually.
Though I try to extract just the elements of the CDATA, it displays entire structure lilke XML DECL and ALL.

Please advise, how can I extract just the required fields?

Like, I referenced them to Environment and then to a constant. Then by specifying Constant.(XML.Element),.

Thanks a bunch
-Learner(Everything Starts from a Single Step to complete a Mile Stone:) )
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 27, 2007 10:10 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Please don't use the XML domain. Please use XMLNS or XMLNSC.

Please search around for other incidents of this same question - there's a very recent thread.

Please consider what 'parse' means, and look at the options on CREATE FIELD.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jorro004
PostPosted: Tue Aug 28, 2007 9:40 am    Post subject: Reply with quote

Acolyte

Joined: 25 Aug 2007
Posts: 50

Thanks for the reply,

BTW, I Could able to look into recent post(Kumar4).
I also get the same Input message and need to convert to standard XML message within the CDATA.

But how can I access the attributes or elements using the XMLNS?
I was not able to navigate to the required element inside the CDATA after parsing. It treats entire message inside CDATA as a single element. Even though there are different elements inside it.

And also getting the same error as in the recent post using ATTACH statement.Please help me!

Thanks
- Learner
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Tue Aug 28, 2007 9:59 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi jorro004,

Please paste a file trace of the tree structure after you've managed the creation into the Environment....or atleast what you see in the debugger.

Only if we see your code can we have an idea of why things are not working...and about how to access attributes and elements in XMLNS please search this forum for snippets.

Regards.
Back to top
View user's profile Send private message Send e-mail
jorro004
PostPosted: Tue Aug 28, 2007 10:44 am    Post subject: Reply with quote

Acolyte

Joined: 25 Aug 2007
Posts: 50

Hi..Thanks So much for your reply,
I'm working as below, Following are errors when I try to ATTACH CDATA from Input Message and also with out ATTACH statement.

Could you please let me know how can I work with for attaching CDATA Elements as Ouput Message which should be done dynamicaly


Last edited by jorro004 on Tue Aug 28, 2007 1:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 28, 2007 1:04 pm    Post subject: Reply with quote

Grand High Poobah

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

STOP waisting our time.
You've been given the answer.

Extract the CDATA as BLOB.
CREATE lastchild of Environment.mycdata PARSE theblob.

Now you'll have a tree in the Environment.mycdata that you can navigate...

Otherwise you will need to use XSLT....

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jorro004
PostPosted: Tue Aug 28, 2007 1:57 pm    Post subject: Reply with quote

Acolyte

Joined: 25 Aug 2007
Posts: 50

Hi,

Sorry for that, I was not able to understand it properly,
Anyways, The solution for my question was simple, The CDATA inside a XML Message cannot be navigate until it is parsed with BLOB.

Other Parser doesnt allow you to Navigate CDATA data.

Thanks for your time
-Learner
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 » Question on Reading XML CDATA Structure
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.