RXS_ParseDomToDom()
This subprocedure retrieves a new RXS_ParseDomDS_t data structure from a parent XML structure, allowing you to retrieve and work with a subset of a larger XML document.
Subprocedure Prototype
 | 
        Returns an RXS_ParseDomDS_t which contains information and pointers used by subsequent DOM parsing APIs.  | 
      
 | 
        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 a DOM from a specified XPath 
*  and storing it in a RXS_ParseDomDS_t datastructure for further 
*  processing.
* 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                                     Inz(*LikeDS)
D gBookDomDS      DS                  LikeDS(RXS_ParseDomDS_t)
D                                     Inz(*LikeDS)
D gXml            S                   Like(RXS_Var8Kv_t)
 /free
  reset gRootDomDS;
  reset gBookDomDS;
  gXml = RXS_GetStdIn();
  gRootDomDS = RXS_OpenDom( gXml );
  gXPath = RXS_XPath( '/*:bookstore/*:book' );
  gBookDomDS = RXS_ParseDomToDom( 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  |