Hi,
I am not sure that this is what you need but some code:
*----------------------------------------------------------------------*
FORM test_02
USING
xml_string TYPE xstring .
DATA: ob_ixml TYPE REF TO if_ixml. " Interface of Factory Object
ob_ixml = cl_ixml=>create( ).
DATA: ob_ixml_streamfactory TYPE REF TO if_ixml_stream_factory. " Factory for Streams
ob_ixml_streamfactory = ob_ixml->create_stream_factory( ).
DATA: ob_ixml_istream TYPE REF TO if_ixml_istream. " Input Streams
ob_ixml_istream = ob_ixml_streamfactory->create_istream_xstring( string = xml_string ).
DATA: ob_ixml_document TYPE REF TO if_ixml_document. " XML Document in DOM Representation
ob_ixml_document = ob_ixml->create_document( ) .
* If you need to parse
DATA: ob_parser TYPE REF TO if_ixml_parser. " Parser
ob_parser = ob_ixml->create_parser( stream_factory = ob_ixml_streamfactory
istream = ob_ixml_istream
document = ob_ixml_document ).
ob_parser->parse( ).
DATA: ob_ixml_stream_factory TYPE REF TO if_ixml_stream_factory. " Factory for Streams
DATA: ob_ixml_ostream TYPE REF TO if_ixml_ostream . " Output Streams
* If you need xstring output
* DATA: xstring TYPE xstring.
* ob_ixml_stream_factory = ob_ixml->create_stream_factory( ).
* ob_ostream = ob_ixml_stream_factory->create_ostream_xstring( xstring ).
* ob_ostream->set_pretty_print( abap_true ).
* ob_ixml_document->render( ostream = ob_ostream ) .
DATA: debug TYPE string.
* For debug purpose only
ob_ixml_stream_factory = ob_ixml->create_stream_factory( ).
ob_ixml_ostream = ob_ixml_stream_factory->create_ostream_cstring( debug ).
ob_ixml_ostream->set_pretty_print( abap_true ).
ob_ixml_document->render( ostream = ob_ixml_ostream ) .
* At this point we have XML
* Look at variable debug using the XML view .
* See the content of count vs the XML output using tabular view
BREAK-POINT .
ENDFORM.
*----------------------------------------------------------------------*