Ansicht
Dokumentation

ABENABAP_IXML_LIB_PARSE_TOKEN - ABAP IXML LIB PARSE TOKEN

ABENABAP_IXML_LIB_PARSE_TOKEN - ABAP IXML LIB PARSE TOKEN

BAL Application Log Documentation   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

- Parsing to Data Objects

A token parser for parsing directly to data objects can be created 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 regular parser and troubleshooting is also the same.

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

  • The method GET_NEXT_TOKEN parses the required tokens iteratively. The method GET_NODE_INFO can be used to read the information about a parsed token to a structure of the type SIXMLNODE.
  • The method PARSE_TOKENS places the information about the required tokens directly into the tabular attribute TOKENS of type SIXMLDOM of line type SIXMLNODE.

The parsed tokens can be specified by using the input parameter TOKEN_MASK. The information that is read is determined by an input parameter INFO_MASK.

Note

By using a token renderer, it is possible to render an internal table of type SIXMLDOM, which contains the complete information for an XML document, into XML data.






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 2715 Date: 20240420 Time: 084302     sap01-206 ( 35 ms )