Skip to Content
0
Former Member
Nov 07, 2005 at 06:59 AM

DOM Programming in class for ABAP Mapping?

50 Views

Hi All!!

I am struggling in transforming XML to be mapping target structures in using ABAP Mapping.

so i am on developing class with DOM.

i would like to know how many <person> derived from source xml, so what method should i use so that i can get that result. or does anyone idea how to work with multirecord to output XML?

data: incode1 type ref to if_ixml_node_collection,

incode2 type ref to if_ixml_node_collection,

  • get message content of tag <FirstName>

incode1 = idocument->get_elements_by_tag_name( 'FirstName' ).

incode2 = idocument->get_elements_by_tag_name( 'LastName' ).

<?xml version="1.0" encoding="UTF-8"?>

*Source XML

http://sap.com/test/ABAPMapping">

<person>

<FirstName>ABAP</FirstName>

<LastName>ITEM1</LastName>

</person>

<person>

<FirstName>ABAP</FirstName>

<LastName>ITEM2</LastName>

</person>

</ns:Personalinfo>

Message was edited by: Tony