Using the CL_XML_DOCUMENT class for XML
The class described in this chapter is based on the very well known and frequently used iXML library. The integrated XML provides a full spectrum of useful tools and methods to read, parse, and edit the XML format. We will use the following XML file in all examples in this chapter:
<?xml version="1.0" encoding="UTF-8"?> <AIRLINES> <SCARR> <CARRID>A2</CARRID> <CARRNAME>Antarctica Airlines</CARRNAME> <CURRCODE>AQD</CURRCODE> <URL>http://antarcticaairlines.aq</URL> </SCARR> </AIRLINES>
The following XML is an airline and booking data model system available in most SAP system IDES versions. We will start every example with a standard, local class—based report. You can find this template in Appendix A, Assessments.
Reading and parsing XML files to ABAP
This example shows how to resolve a situation where we have an external system, Y, which exports airline data to an XML file...