Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Append node with children to IF_IXML_DOCUMENT

Former Member
0 Likes
738

Hi,

I am doing a ABAP mapping using the If_IXML interface. I have a message looking like this:

<Transaction>

<LineType>M</LineType>

<PersonellNumber>999999999</PersonellNumber>

<Name>MonkeyBoy</Name>

</Transaction>

<Transaction>

...

...

When I have a Transaction Node as a IF_IXML_NODE, is it then possible to add the whole node, with childen to my output document of type IF_IXML_DOCUMENT, or do I have to traverse through it all manually?

Thanks in advance

Mikkel

Hi,

I am doing a ABAP mapping using the If_IXML interface. I have a message looking like this:

<Transaction>

<LineType>M</LineType>

<PersonellNumber>999999999</PersonellNumber>

<Name>MonkeyBoy</Name>

</Transaction>

<Transaction>

...

...

When I have a Transaction Node as a IF_IXML_NODE, is it then possible to add the whole node, with childen to my output document of type IF_IXML_DOCUMENT, or do I have to traverse through it all manually?

Thanks in advance

Mikkel

1 REPLY 1
Read only

uwe_schieferstein
Active Contributor
0 Likes
584

Hello Mike

Assuming that there is still some superordinated element, e.g.

<root>
  <Transaction>
        ...
  </Transaction>
  <Transaction>
        ...
  </Transaction>
...
</root>

I would try the following approach:

(1) Call method IF_IXML_NODE~GET_ROOT of your document (IF_IXML_DOCUMENT)

" >>> returns IF_IXML_NODE (root node)

(2) Call method APPEND_CHILD of the the root node with your IF_IXML_NODE instance

representing the single TRANSACTION node (including sub-nodes)

Regards

Uwe