Skip to Content
0
Former Member
Aug 13, 2009 at 06:53 AM

Need help with XML TRANSFORMATION dump

1079 Views

HI Experts ,

I want to parse this XML file to abap internal table ,i use the ST below and i get dump .

The file is like that :

<Containers>
	<Container workitemid="0000001" IsParent="X">
		<Element name="__INITIATO" value="U295"/>
		<Element name="_W_PRITY" value="5"/>
		<Element name="_F_VERSION" value="0000"/>
</Container>
<Container workitemid="0000001">
		<Element name="EXTENDED" value="X"/>
		<Element name="NOTE_REFERENCE" value=""/>
	</Container>
</Containers>

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_ST_MATCH_ELEMENT', was not caught

and

therefore caused a runtime error.

The reason for the exception is:

XML matching error

Expected was element-end: "Containers" [ ] Read was element-start: "Container"

[ ].

this is the ciode that i put on the call transformation

<Containers>
    <Container>
        <tt:loop name="a" ref=".XML_TAB">
        <Element >
          <tt:attribute name="name" value-ref="$a.name"/>
          <tt:attribute name="value" value-ref="$a.value"/>
          </Element>
          </tt:loop>
        </Container>
    </Containers> ->**the dump in the debugger is here .**
  </tt:template>
</tt:transform>

the dump is because i don't refer to the </Container> in the middle

and when i try to add the tag container in the middle i get warning during complition

any idea please im stuck

Best Regards

Chris

Edited by: Chris Teb on Aug 14, 2009 6:25 PM