SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Data Interfaces and Communication Interfaces → ABAP and XML → Class Libraries for XML → iXML Library →iXML Library - Streams and Documents
Input Streams and Output Streams
Input streams are used for the input of XML data into the parser and output streams are used to pass XML data from the renderer. A factory is needed to create a stream, which can be created using the iXML factory as follows:
The static type of the reference variable stream_factory is then the interface IF_IXML_STREAM_FACTORY, which contains factory methods CREATE_ISTREAM_... for input streams and CREATE_OSTREAM_... for output streams.
Different streams can be created for different data sources and data sinks, such as strings, internal tables, or files specified by URI.
Notes
Example
The XML result of a transformation of an ABAP data object to the asXML format is used to created an iXML input stream. This stream is then transformed back again.
XML Documents
Each XML saved in DOM format in the memory is managed using a separate object. An object of this type can be created as follows:
The static type of the reference variable stream_factory is also IF_IXML_DOCUMENT. A document created in this way
Note
iXML documents can be specified as an XML target; iXML documents and their nodes can be specified as an XML source for XSL transformations called using CALL TRANSFORMATION.
Example
Creates a document and uses it as the XML target of an XSL transformation. The filled document is then passed to a renderer (to which an output stream for a character string is bound simultaneously) and rendered. The character string then contains the character-like representation of the XML data.