ABAP - Keyword Documentation →  ABAP - Reference →  Data Interfaces and Communication Interfaces →  ABAP and XML →  Class Libraries for XML → 

iXML Library

API of iXML Library

iXML Library provides an API for handling XML documents in DOM format. This API enables

In ABAP programs, the API is implemented using interfaces from the class library with the naming convention IF_IXML_.... The access class CL_IXML contains factory methods for creating objects such as streams, parsers, documents, and renderers. These objects are then accessed using interface reference variables. The classes and interfaces are documented in Class Builder.


Access to iXML Library

Precisely one factory object of the access class CL_IXML is required for accessing iXML Library in an ABAP program. This object is created as follows:

DATA(ixml) = cl_ixml=>create( ).

The static type of the reference variable ixml is then the interface IF_IXML, which contains all factory methods required to create further objects, such as streams, XML documents, parsers, or renderers. This factory object is a singleton and can only be instantiated once in one internal session.

Services in iXML Library

The most important services offered by the classes and interfaces in iXML Library are as follows:

The XML parser analyzes the syntax of an XML file provided in an input stream to check whether it is correct and creates an XML document in a DOM representation from this file. The document can then be accessed using interfaces. The DOM can be created as follows:
An XML document represented as DOM is in a standardized tree representation. For each logical unit of the XML document, there is a node object of an associated class that implements specialized interfaces. An ABAP program can use the interfaces to perform reads and writes to the XML document. The classes of the node objects are not usually used directly in the program.
The XML renderer creates XML data from an XML document saved as DOM. This document is created by parsing (both with and without follow-up modifications) or created as a complete new document using the methods of the DOM interface. The renderer then passes the data to an output stream.


iXML Library - Streams and Documents
iXML Library - Parse
iXML Library - Access to DOM
iXML Library - Render
iXML Library - Classes and Interfaces
iXML Library, Examples