Use the following ESQL code DECLARE refType REFERENCE TO InputRoot.XML.source.topGroup.group1; WHILE LASTMOVE(refType) DO DECLARE refElement REFERENCE TO refType; MOVE refElement FIRSTCHILD TYPE 0x1000000; WHILE LASTMOVE(refElement) DO CREATE LASTCHILD OF OutputRoot.XML.target.myNewGroup FROM refElement; MOVE refElement NEXTSIBLING TYPE 0x1000000; END WHILE; MOVE refType NEXTSIBLING TYPE 0x1000000; END WHILE;
Don´t forget to check the copy message headers in the compute node. Cheers, Manuel > -----Mensaje original----- > De: jesse h. goode jr. [SMTP:[EMAIL PROTECTED]] > Enviado el: Wednesday, October 16, 2002 12:33 AM > Para: [EMAIL PROTECTED] > Asunto: ESQL Help in WMQI 2.1 > > Have WMQI 2.1 , and need to understand the most efficient way to code this > in ESQL. Here's a simple example of the source... and what the target > needs to look like ( see below ). > > Not sure if this is easily accomplished with (1) "select" commands, or (2) > a cursor approach. i.e. Creating a reference then Moving to the > reference... FirstChild, Next Sibling... or (3) Getting the Cardinality at > a particular reference... then looping through setting Input to an Output. > Really a matter of getting the groupN tags out of the way.... moving their > children up a level to a new parent group. > > Anyone done something similar.... or have thoughts on it? TIA > > jesse goode jr > valero energy corp. > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > > <source> > <topGroup> > <group1> > <aData1> > <aData2> > <aData3> > </group1> > <group2> > <bData1> > <bData2> > <bData3> > </group2> > <groupN> > <cData1> > <cData2> > <cData3> > </groupN> > </topGroup> > </source> > > > <target> > <myNewGroup> > <aData1> > <aData2> > <aData3> > <bData1> > <bData2> > <bData3> > <cData1> > <cData2> > <cData3> > <myNewGroup> > <target> Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive