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 » Message tree access problem in ESQL

Post new topic  Reply to topic
 Message tree access problem in ESQL « View previous topic :: View next topic » 
Author Message
psk
PostPosted: Thu Apr 25, 2002 10:38 am    Post subject: Reply with quote

Novice

Joined: 24 Apr 2002
Posts: 14

Hi,
I have XML like <AAA><BBB></BBB></AAA> , <CCC><BBB></BBB></CCC>.
As the outer tag is variable I am accessing it as OutputRoot.XML.*[1].BBB. But when the user has a xml declaration like
<?xml version="1.0"?><AAA><BBB></BBB></AAA>
OutputRoot.XML.*[1].BBB fails . it wants it as OutputRoot.XML.*[2].BBB.
This makes the code shabby with If THEN ELSE condition.
Is there a way in ESQL to Access the BBB tag directly in a common way, even if declaration ( <?xml version="1.0"?> ) exists or not.

Thanks in advance,

Back to top
View user's profile Send private message
kirani
PostPosted: Thu Apr 25, 2002 10:59 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Try using OutputRoot.XML.*[LAST].BBB

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
psk
PostPosted: Thu Apr 25, 2002 11:23 am    Post subject: Reply with quote

Novice

Joined: 24 Apr 2002
Posts: 14

Hi,
Thanks for the prompt reply. I too had thought so and had tried it out before and even now after ur suggestion . It does not work .. When there is a XML declaration, it gives FIELDNAME of Root.XML.*[1] and Root.XML.*[LAST] as XML.
Please suggest if u have any other idea,
Thanks again,
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Apr 25, 2002 12:38 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Hi,
I tested above ESQL on my box (WMQI2.1 CSD2 on WIN2K) and it is working fine,
FIELDNAME(InputRoot.*[LAST].*[LAST]) will always give you the top level element name.
For example, if you send following messages as input to your message flow

1. <?xml version="1.0"?><AAA><BBB></BBB></AAA>
2. <AAA><BBB></BBB></AAA>
3. <CCC><BBB></BBB></CCC>

FIELDNAME(InputRoot.*[LAST].*[LAST]) or FIELDNAME(InputRoot.XML.*[LAST]) will give you,
1. AAA
2. AAA
3. CCC

I guess this is what you are looking for.



_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
psk
PostPosted: Thu Apr 25, 2002 12:49 pm    Post subject: Reply with quote

Novice

Joined: 24 Apr 2002
Posts: 14

Hey thanks,
I tried it again now and got it working.. I guess I was making some mistake initially..couldnt figure out what it was..
Thanks very much for the help,
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 » Message tree access problem in ESQL
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.