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 the Root element of XML

Post new topic  Reply to topic
 Reading the Root element of XML « View previous topic :: View next topic » 
Author Message
kash3338
PostPosted: Sun Apr 19, 2009 9:52 pm    Post subject: Reading the Root element of XML Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Hi,

I want to get the Root element of an XML into an variable in my ESQL code. For example, lets consider a XML,

<Customer Name="" ID=""/>

I want the root element "Customer" in an variable in my ESQL code. Can anyone help me on how to get this?

Regards,
Kashyap.
Back to top
View user's profile Send private message Send e-mail
elvis_gn
PostPosted: Sun Apr 19, 2009 10:17 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi kash3338,

Please read the product docs...there is one on ESQL commands.

Look up FIELDNAME.

Regards.
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Mon Apr 20, 2009 12:43 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

If you are using the MRM domain, getting the root tag name is very difficult.
If you are using XMLNSC ( as you should be ) then it is very simple.
Back to top
View user's profile Send private message
kash3338
PostPosted: Mon Apr 20, 2009 9:03 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

elvis_gn wrote:
Hi kash3338,

Please read the product docs...there is one on ESQL commands.

Look up FIELDNAME.

Regards.


Hi Elvis, FIELDNAME has solved my problem in getting the root element, but can you please tell me how to get the Child element of each element(if any) in such variable?

I tried looking into the docs, but i could not find a solution for this. Is there any way by which i can store each element in a variable?
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Apr 20, 2009 9:14 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kash3338 - It's not clear what you're asking. The way you have phrased it doesn't make sense.

Message Broker is not an easy product to learn on your own. Your best bet is to extensively study the Samples that come with the product, read a lot of Redbooks, and try a lot of things.

Be warned that we do not provide training on this forum. If you do not spend your own effort making good posts that show you have tried things on your own and read the documentation, you will get a lot of responses that you probably won't like.
Back to top
View user's profile Send private message
WMBDEV1
PostPosted: Mon Apr 20, 2009 9:25 am    Post subject: Reply with quote

Sentinel

Joined: 05 Mar 2009
Posts: 888
Location: UK

kash3338 wrote:

I tried looking into the docs


How hard did you look? Although looking at your other topic, http://www.mqseries.net/phpBB2/viewtopic.php?t=48785, I can see you still miss the answer even when taken to the correct page of the documentation!

How about using fieldname again on the FIRSTCHILD of the current element?

Also consider getting some training, these sorts of quesitons are answered in any basic broker training course
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 the Root element of XML
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.