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


Former Member
0 Kudos

Hi colleagues,

i use CL_XML_DOCUMENT: CREATE_WITH_DATA to create a XML file.

This works fine, but there is one thing that I would like to change:

The created XML has the following structure:

<?xml version="1.0" ?>

- <DATA>

- <item>




Is it somehow possible to change the structure to the following?:


<Item KEY="ABC" VALUE="00" />

I can read a file that had a strucuture like the structure I would like to

have with CL_XML_DOCUMENT->IMPORT_FROM_FILE , so it should be a valid

represantion of a XML.

Thanks for any responses.

Best Regards



Former Member
0 Kudos

OK, I found the error:

CRETE_WITH_DATA does only build elements. What I need is elements with attribute.

I am now building the XML by looping over my internal tabel and building the elements and setting the attributes.

0 Kudos

you can also use the approach explained in this thread for setting element attributes.