RXS_DOMGetData()
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.
Call this subprocedure after a call to RXS_DOMBuild() to retrieve the value of an XML element or attribute.
Note: Only the first parameter (pXPath1) is required. If more than one parameter is specified, the following rules apply:
- If the last XPath parameter specified includes an attribute, it must be the last parameter.
- If the last XPath parameter specified does NOT include an attribute AND it is the last parameter, the DOM Parser will assume that the first instance of that XPath is intended.
Subprocedure Prototype
|
Retrieves data elements from a specific XPath. Returns the contents of the element specified and parsed out of the provided XML. If the last XPath parameter includes an attribute, it must be the last parameter. If the last XPath parameter does not include an attribute and it is the last parameter, the DOM parser will assume that the first instance of that XPath is intended. |
|
Required An XPath segment value. |
|
Required An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |
|
An XPath segment value. |
|
An integer indicating the instance of the specified XPath segment. |