Skip to Content
0
Former Member
Nov 30, 2008 at 02:40 AM

XML - change element/node name

526 Views

Hi,

I'm using this function to generate the data to dom.

CALL FUNCTION 'SDIXML_DATA_TO_DOM'

EXPORTING

NAME = 'ACCESOS'

DATAOBJECT = ACCESOS[]

IMPORTING

DATA_AS_DOM = L_DOM

CHANGING

DOCUMENT = M_DOCUMENT

EXCEPTIONS

ILLEGAL_NAME = 1

OTHERS = 2.

IF SY-SUBRC = 0.

WRITE 'Ok'.

ELSE.

WRITE: 'Err =',

SY-SUBRC.

ENDIF.

My issue is when i'm using this function it will generate the xml in this format

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

- <ACCESOS>

- <item>

- <SOCIO>

<NUMERO>00045050</NUMERO>

<REPOSICION>0</REPOSICION>

<NOMBRE>MOISES MORENO</NOMBRE>

- <TURNOS>

<LU>T1</LU>

<MA>T2</MA>

<MI>T3</MI>

<JU>T4</JU>

<VI>T5</VI>

<SA>T6</SA>

<DO>T7</DO>

</TURNOS>

</SOCIO>

</item>

</ACCESOS>

May I know how could I change the "<item" and "</item>" description to "<testing>" and "</testing>". Kindly help me on this.

Thanks.