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 » Parsing Message Tree

Post new topic  Reply to topic
 Parsing Message Tree « View previous topic :: View next topic » 
Author Message
Mohit Gupta
PostPosted: Mon Dec 20, 2004 12:26 am    Post subject: Parsing Message Tree Reply with quote

Apprentice

Joined: 16 Sep 2004
Posts: 34

Hi,

If i have a message tree in this format:
<RowSet id='UnProcessed'>
<Row>
<a></a>
<b></b>
...so on
</Row>
...Row n times
</RowSet>
RowSet n times with different attributes

Now if i want to create another RowSet with attribute 'Processed' and the elements are not in the order as the RowSet of 'UnProcessed' then currently i am doing one by one
SET OutPutRoot.MRM.RowSet.Row[1].a = ...
SET OutPutRoot.MRM.RowSet.Row[1].b = ...

So if there are 50 elements in Row i have to write 50 lines for creating new RowSet.

Is there any dynamic way of doing this.

like if i a get a reference upto OutputRoot.MRM.RowSet.Row and getting the names of the element under row dynamically. There is only FIRSTCHILD and LASTCHILD but not NEXTCHILD . if i do NEXTSIBLING then it moves to next Row.

Please suggest.
Cheers,
Mohit
Back to top
View user's profile Send private message
martinrydman
PostPosted: Mon Dec 20, 2004 1:08 am    Post subject: Reply with quote

Centurion

Joined: 30 Jan 2004
Posts: 139
Location: Gothenburg, Sweden

Hi,

NEXTSIBLING is the way to go. You didn't post any code, but it would seem you do NEXTSIBLING with a ref to Row, whereas you probably first want to do a MOVE FIRSTCHILD (to get to the first element in the list of elements under Row), and then traverse that list with NEXTSIBLING.

/Martin
Back to top
View user's profile Send private message
Mohit Gupta
PostPosted: Mon Dec 20, 2004 1:59 am    Post subject: Reply with quote

Apprentice

Joined: 16 Sep 2004
Posts: 34

Oh, might be you are correct i have noticed they have provided FIRSTCHILD and LASTCHILD and subsequently NEXTSIBLING and PREVIOUSSIBLING so if i move the cursor to FIRSTCHILD and then doing NEXTSIBLING is equivalent to NEXTCHILD.

Logically it sounds correct i will try that.

Thanks for giving right direction.

Cheers,
Mohit
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 » Parsing Message Tree
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.