|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Parsing Message Tree |
« View previous topic :: View next topic » |
Author |
Message
|
Mohit Gupta |
Posted: Mon Dec 20, 2004 12:26 am Post subject: Parsing Message Tree |
|
|
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 |
|
 |
martinrydman |
Posted: Mon Dec 20, 2004 1:08 am Post subject: |
|
|
 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 |
|
 |
Mohit Gupta |
Posted: Mon Dec 20, 2004 1:59 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|