Author |
Message
|
MQUser123 |
Posted: Wed Sep 22, 2004 11:53 am Post subject: Insert a New tag in XML |
|
|
Novice
Joined: 28 Aug 2003 Posts: 18
|
How do I insert a new tag in my XML in the Compute Node.
Before going through the COmpute Node XML looks like this:
<ADD_PO>
<POHEADER>
<USERAREA>
<TAG1></TAG1>
</USERAREA>
</POHEADER>
</ADD_PO>
After going through the Compute Node XML should Look like this
<ADD_PO>
<POHEADER>
<USERAREA>
<TAG1></TAG1>
<TAG2></TAG2>
</USERAREA>
</POHEADER>
</ADD_PO>
Any help would be appreciated. |
|
Back to top |
|
 |
ACheeseman |
Posted: Wed Sep 22, 2004 2:04 pm Post subject: |
|
|
 Novice
Joined: 25 Feb 2004 Posts: 19 Location: London UK
|
Hi Assuming you are in the XML domain you would set a new tag like so
Code: |
CREATE LASTCHILD OF OutputRoot.XML.ADD_PO.POHEADER.USERAREA TYPE NameValue NAME Tag2 |
This is going to insert a new field of name Tag2 after Tag1, the value will be null. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Sep 22, 2004 2:11 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Or just use 'Set'. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
MQUser123 |
Posted: Thu Sep 23, 2004 10:59 am Post subject: Failing |
|
|
Novice
Joined: 28 Aug 2003 Posts: 18
|
Thanks for teh response.
Using teh CREATE FIRSTCHILD....
its failing at that node.
is there anyreason why it should. Also if I was to use the SET statement, how do I do that. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 23, 2004 11:49 am Post subject: Re: Failing |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
MQUser123 wrote: |
if I was to use the SET statement, how do I do that. |
If you seriously do not understand how to use SET, then you seriously need to spend some time reading the documentation. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
MQUser123 |
Posted: Thu Sep 23, 2004 12:03 pm Post subject: SET statement |
|
|
Novice
Joined: 28 Aug 2003 Posts: 18
|
I have used teh SET statement and I know how to use it. But in this case where I have to Insert a New TAG in the XML, I do not know how do I go about doing that. |
|
Back to top |
|
 |
siliconfish |
Posted: Thu Sep 23, 2004 12:09 pm Post subject: |
|
|
 Master
Joined: 12 Aug 2002 Posts: 203 Location: USA
|
CREATE NEXTSIBLING OF OutputRoot.XML.ADD_PO.POHEADER.USERAREA.TAG1 TYPE NameValue NAME 'TAG2'; |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 23, 2004 12:39 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Set OutputRoot.XML.ADD_PO.POHEADER.USERAREA.TAG2 value = null; _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|