|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Combine two XML Parents |
« View previous topic :: View next topic » |
Author |
Message
|
kirani |
Posted: Tue Aug 31, 2004 10:24 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
It's be good if you could post your complete updated code (initially posted by MGK) so hat others can refer to it. _________________ 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 |
|
 |
mgk |
Posted: Wed Sep 01, 2004 12:05 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1647
|
Hi njpeeke.
As you found what I posted was indeed written and tested on V5. The REPEAT clause was either added in V5 or a late 2.1 CSD, I forget which.
I am glad it works for you. _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
EnOne |
Posted: Wed Sep 01, 2004 5:36 am Post subject: |
|
|
 Centurion
Joined: 09 Oct 2002 Posts: 101 Location: Kansas City
|
my final code looks like the following
/*local variables*/
DECLARE inRef REFERENCE TO InputRoot.XML.OT.ParentA;
DECLARE tmpRef REFERENCE TO inRef;
/*create output destination*/
CREATE LASTCHILD OF OutputRoot.XML.OT DOMAIN 'XML' NAME 'Parent';
/*loop over outer Parent elements, moving inRef to each in turn*/
WHILE LASTMOVE(inRef) DO
MOVE tmpRef TO inRef;
MOVE tmpRef FIRSTCHILD;
/*loop over inner child elements, moving tmpRef to each in turn*/
WHILE LASTMOVE(tmpRef) DO
/*copy each child element to destination*/
CREATE LASTCHILD OF OutputRoot.XML.OT.Parent FROM tmpRef;
MOVE tmpRef NEXTSIBLING;
END WHILE;
MOVE inRef NEXTSIBLING;
END WHILE;
|
|
Back to top |
|
 |
javaforvivek |
Posted: Wed Sep 01, 2004 10:41 pm Post subject: |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
I agree,
I added your code after
Code: |
SET OutputRoot = InputRoot;
|
Now it's working fine, when I commented the line OutputRoot = InputRoot;
Thanks. _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
|
|
|
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
|
|
|
|