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 » Combine two XML Parents

Post new topic  Reply to topic Goto page Previous  1, 2
 Combine two XML Parents « View previous topic :: View next topic » 
Author Message
kirani
PostPosted: Tue Aug 31, 2004 10:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
mgk
PostPosted: Wed Sep 01, 2004 12:05 am    Post subject: Reply with quote

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
View user's profile Send private message
EnOne
PostPosted: Wed Sep 01, 2004 5:36 am    Post subject: Reply with quote

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
View user's profile Send private message
javaforvivek
PostPosted: Wed Sep 01, 2004 10:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Combine two XML Parents
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.