NOTE: The RXS_DOM* APIs were created to allow for a different approach to parsing XML documents. Depending on the complexity of your XML and what data elements you are parsing, the RXS_DOM* APIs can make the syntax for parsing simpler. The simpler syntax comes with a cost because the entire XML document is parsed and stored in memory so you can access any element data at any time (think of it as being able to “CHAIN” to the XML structure - random access). Performance for smaller XML files is comparable for the two XML parsers within RPG-XML Suite, but the larger the XML file the bigger the divide. For example, a large 4MB XML file will take 200 seconds with the event based parser and 600 seconds with the DOM parser. So make sure to factor that into your decision on whether to use the RXS_DOM* APIs to parse or the event based parser.

Use this subprocedure to set the base value of the XML document’s XPath. This is typically used for an XML structure that contains long element names and/or many parent-child relationships. This XPath is used in conjunction with the RXS_DOMGetData() and RXS_getXPath() APIs.

Subprocedure Prototype

D RXS_setXPath    pr

Used to set the base value of the XML document's XPath.

D  pXPath                             const like(RXS_XPath)

An XPath segment value.