Author |
Message
|
kash3338 |
Posted: Sun Apr 19, 2009 9:52 pm Post subject: Reading the Root element of XML |
|
|
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 |
|
 |
elvis_gn |
Posted: Sun Apr 19, 2009 10:17 pm Post subject: |
|
|
 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 |
|
 |
kimbert |
Posted: Mon Apr 20, 2009 12:43 am Post subject: |
|
|
 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 |
|
 |
kash3338 |
Posted: Mon Apr 20, 2009 9:03 am Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Mon Apr 20, 2009 9:14 am Post subject: |
|
|
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 |
|
 |
WMBDEV1 |
Posted: Mon Apr 20, 2009 9:25 am Post subject: |
|
|
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 |
|
 |
|