Action: GetChildNodes

Purpose: Returns pointers to all the immediate child nodes of a specified node. The child nodes are listed in sibling sequence as they appear in the DOM, ie starting with the FirstChild Node, via the NextSibling nodes until the LastChild node.

Action-specific name/value pairs:

Parameter Name Description
NodeOID The Node whose Child Nodes are to be retrieved.

Alternatively, the parameters above can be incorporated into a single JSON string and specified using the parameter name JSON, eg:

{NodeOID:"1-4"}

Example Request

Action=GetChildNodes
&MDBAccessKeyId=[your access key id]
&NodeOID=1-4
&Signature=[computed signature]
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2009-06-14T13%3A19%3A41
&Version=2009-04-15
&db=mdbx

or:

Action=GetChildNodes
&JSON=%7BNodeOID%3A%221-4%22%7D
&MDBAccessKeyId=[your access key id]
&OutputFormat=JSON
&Signature=[computed signature]
&SignatureMethod=HmacSHA256
&SignatureVersion=2
&Timestamp=2009-06-14T13%3A19%3A41
&Version=2009-04-15
&db=mdbx

Example Response

XML

<?xml version='1.0'?>
<GetChildNodesResponse xmlns="http://mdbx.mgateway.com/doc/2009-06-05/">
   <GetChildNodesResult>
      <ChildNode>
         <NodeOID>
            1-7
         </NodeOID>
         <NodeType>
            3
         </NodeType>
      </ChildNode>
      <ChildNode>
         <NodeOID>
            1-8
         </NodeOID>
         <NodeType>
            3
         </NodeType>
      </ChildNode>
      <ChildNode>
         <NodeOID>
            1-14
         </NodeOID>
         <NodeType>
            8
         </NodeType>
      </ChildNode>
      <ChildNode>
         <NodeOID>
            1-17
         </NodeOID>
         <NodeType>
            1
         </NodeType>
      </ChildNode>
   </GetChildNodesResult>
</GetChildNodesResponse>

The GetChildNodes Action returns the NodeOID and NodeType of all the Child Nodes.

JSON (ie if OutputFormat=JSON specified in the Request)

["1-7","1-8","1-14","1-17"]

The JSON output is much more succinct, simply being an array of Child Node OIDs.