Skip to content

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

iXML Library - Parsing to Data Objects

You can create a token parser for parsing directly to data objects as follows:

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

...

DATA(token_parser) = ixml->create_token_parser(
                       istream        = ...
                       document       = ...
                       stream_factory = ... ).

The static type of the reference variable token_parser is then the interface IF_IXML_TOKEN_PARSER. A token parser requires the same input parameters as a normal parser and the error analysis is also the same.

However, an XML document in DOM format is usually not generated. Instead, the information for the required XML data token is written directly to the ABAP data objects.

  • The GET_NEXT_TOKEN method uses iterative parsing to parse the required tokens. Use the method GET_NODE_INFO to read the information on a parsed token into a structure of type SIXMLNODE.
  • The PARSE_TOKENS method enters the information on the required tokens directly into the tabular attribute TOKENS of type SIXMLDOM of row type SIXMLNODE.

You can specify which tokens are parsed by using the TOKEN_MASK input parameter. You can specify which information is output by using the INFO_MASK input parameter.

Other versions: 7.31 | 7.40 | 7.54


Note

By using a token renderer, you can render an internal table of type SIXMLDOM (which contains the complete information for an XML document) into XML data.