Author |
Message
|
petervh |
Posted: Tue Oct 02, 2007 6:30 am Post subject: Duplicating a section of an XML structure |
|
|
Apprentice
Joined: 15 Jun 2006 Posts: 31
|
I have an XML structure something like:
<a>xxx<b>yyy<c>zzz</c></b></a>
I'm trying to duplicate just the section from <b>yyy<c>zzz</c></b> on the same level as the first <b> element in a Compute node.
I've tried using CREATE NEXTSIBLING OF (ref pointer) AS (ref pointer)REPEAT and
ATTACH (ref pointer) to (ref pointer2) AS LASTCHILD
but I get an error indicating that I'm creating a loop or that I can't create an element as a sibling of an unattached element. I guess the error message makes sense, but surely there must be a simple way to do this...
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 02, 2007 6:45 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
So you're trying to create two copies of InputRoot.XMLNS.a.b?
Code: |
set OutputRoot.XMLNS.a.b[1]=InputRoot.XMLNS.a.b;
Set OutputRoot.XMLNS.a.b[2] = InputRoot.XMLNS.a.b; |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Jenney |
Posted: Tue Oct 02, 2007 8:16 am Post subject: |
|
|
Voyager
Joined: 25 Apr 2007 Posts: 83 Location: Melbourne
|
I am trying to create an XML from CWF
is there better way to do it using Create field function, there is little complication XML element will have some repeating elements which CWF don't, Both XML and CWF has MRM
Will broker understand that and creates it automatically or I have to do it manually?
Thanks |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Oct 02, 2007 8:19 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You can't configure MRM to say "produce two copies of this element, when you serialize the logical message into a bitstream".
So you have to write code to create two logical elements. _________________ I am *not* the model of the modern major general.
Last edited by jefflowrey on Wed Oct 03, 2007 3:24 am; edited 1 time in total |
|
Back to top |
|
 |
petervh |
Posted: Wed Oct 03, 2007 12:43 am Post subject: |
|
|
Apprentice
Joined: 15 Jun 2006 Posts: 31
|
|
Back to top |
|
 |
|