AS ABAP Release 758, ©Copyright 2024 SAP SE. All rights reserved.
ABAP - Keyword Documentation → ABAP - Programming Language → Data Interfaces and Communication Interfaces → ABAP and XML → XML - Class Libraries → iXML Library → iXML - Parsing →iXML - Troubleshooting After Parsing
If a parser detects errors in the XML data to be parsed, its method NUM_ERRORS returns the number of errors. These can be analyzed using the objects created as follows:
The static type of the reference variable error is then the interface IF_IXML_PARSE_ERROR. The number of the error can be passed to the parameter index. Counting begins at zero. If index has any other values, error remains initial.
Example
The parsed XML data contains tags that are not closed correctly, which means that parsing is terminated after the first incorrect tag. The parser adds the first closing tag but does not write any further data to DOM. The method handle_errors reads the errors.