Action: GetFirstChild

Purpose: Returns a pointer to the First Child Node of a specified Node.

Action-specific name/value pairs:

Parameter Name Description
NodeOID The OID of the node whose First Child node is 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=GetFirstChild
&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=GetFirstChild
&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'?>
<GetFirstChildResponse xmlns="http://mdbx.mgateway.com/doc/2009-06-05/">
   <GetFirstChildResult>
      <NodeOID>
         1-7
      </NodeOID>
      <NodeType>
         3
      </NodeType>
   </GetFirstChildResult>
</GetFirstChildResponse>

Note that this Action also retrieves the NodeType of the First Child node, and its TagName if the First Child Node is an Element.

If the node has no children, the response will be as follows:

<?xml version='1.0'?>
<GetFirstChildResponse xmlns="http://mdbx.mgateway.com/doc/2009-06-05/">
   <GetFirstChildResult />
</GetFirstChildResponse>

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

{NodeOID:"1-7",NodeType:3}

Note that this Action also retrieves the NodeType of the First Child node, and its TagName if the First Child Node is an Element.

If the node has no children, the response will be as follows:

{NodeOID:""}