Author |
Message
|
KEBI22 |
Posted: Tue Oct 19, 2004 2:20 am Post subject: XML to XML |
|
|
Newbie
Joined: 19 Oct 2004 Posts: 2
|
i have the following input in XML:
<XML>
<Header>Feld1</HEADER>
<DATA>
<DATA1>
<FELD1>TEXTF1</FELD1>
</DATA1>
<DATA2>
<FELD1>TEXTF2</FELD2>
</DATA2>
</DATA>
</XML>
and i wish the following output-message in xml
<XML>
<DATA>
<DATA1>
<FELD1>TEXTF1</FELD1>
</DATA1>
</DATA>
</XML>
Der SourceCode that i use:
SET OutputRoot = InputRoot.XML.DATA.DATA1.*[I];
it's nor running, whats false ???
Thanks
Bruno |
|
Back to top |
|
 |
fschofer |
Posted: Tue Oct 19, 2004 5:30 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Try
SET OutputRoot.XML.DATA.DATA1 = InputRoot.XML.DATA.DATA1;
Greetings
Frank |
|
Back to top |
|
 |
waugh |
Posted: Tue Oct 19, 2004 5:30 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 225
|
did you try DELETE FIELD ?
DELETE FIELD OutputRoot.XML.{msgname}.Header;
DELETE FIELD OutputRoot.XML.{msgname}.Data2;
Yep,
frank's solution is even perfect. |
|
Back to top |
|
 |
JT |
Posted: Tue Oct 19, 2004 5:55 am Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
Quote: |
SET OutputRoot.XML.DATA.DATA1 = InputRoot.XML.DATA.DATA1; |
Not sure if it was intentional, but the XML KEBI22 posted has a parent tag of "XML", so it should be:
Code: |
SET OutputRoot.XML.XML.DATA.DATA1 = InputRoot.XML.XML.DATA.DATA1; |
|
|
Back to top |
|
 |
KEBI22 |
Posted: Tue Oct 19, 2004 8:14 am Post subject: Thanks to all |
|
|
Newbie
Joined: 19 Oct 2004 Posts: 2
|
Thanks for all answers.......................
i use with this command now and it's running............
SET OutputRoot.XML.DATA.DATA1=InputRoot.XML."XML".DATA.DATA1;
importend is the "XML" declaration, XML are a reservated word..........
i think this was the problem
Thanks to all
bruno |
|
Back to top |
|
 |
|