RXS_ParseDomToXml()
This subprocedure retrieves the raw XML from a specific XPath.
Subprocedure Prototype
|
Returns the XML subsection retrieved by the specified XPath. |
|
XPath used to determine which nodes are retrieved into the RXS_ParseDomDS_t return data structure. |
|
RXS_ParseDomDS_t data structure, e.g. the “parent” structure. |
|
|
|
Holds the XML subsection retrieved by the specified XPath. |
|
XPath used to determine which nodes are retrieved into the RXS_ParseDomDS_t return data structure. |
|
RXS_ParseDomDS_t data structure, e.g. the “parent” structure. |
Example Code
*--------------------------------------------------------------
* This example demonstrates retrieving the raw XML data from a specified
* XPath and storing it in a character field.
* This example uses IBM i 7.1+ prototypes for most calls; refer to
* the individual documentation for these subprocedures for the
* 6.1 prototypes.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)
/copy QRPGLECPY,RXSCB
D gRootDomDS DS LikeDS(RXS_OpenDomDS_t)
D gXml S Like(RXS_Var8Kv_t)
D gData S Like(RXS_Var8Kv_t)
/free
RXS_ResetDS( gRootDomDS : RXS_DS_TYPE_OPENDOM );
gXml = RXS_GetStdIn();
gRootDomDS = RXS_OpenDom( gXml );
gXPath = RXS_XPath( '/*:bookstore/*:book' );
gData = RXS_ParseDomToXml( gXPath : gRootDomDS );
*INLR = *ON;
/end-free
Data Structures
|
|
|
|
|
|
|
Specifies the CCSID of the XML being parsed. |
|
Specifies the CCSID the parsed data will be converted to. |
|
Specifies an IFS path to an XML file to parse instead of the Input parm. |
|
Contains the current count of XML nodes tracked by this data structure. |
|
|
|
Internal use only |
|
Internal use only |
|
Internal use only |
|
Internal use only |
|
Internal use only |
|
Internal use only |
|
Internal use only |