The GETFIRSTCHILD function returns the first child node of a specified DOM node. If the node has no child nodes, it returns a null node handle; you can use ISNULL to check if the return value is null.
Applicability
This content applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL-compatible mode.
Note
For V4.4.2, this subprogram is available starting with OceanBase Database V4.4.2 BP3.
Syntax
DBMS_XMLDOM.getFirstChild (
n IN DBMS_XMLDOM.DOMNODE);
Parameters
Parameters |
Explanation |
|---|---|
| n | To queryDBMS_XMLDOM.DOMNODEHandle. |
Return value
Handle of the first child node. If no child nodes exist, this handle is null.
Usage instructions
We recommend that you use ISNULL to check whether the return value is null, so as to avoid further operations on a null handle.
Examples
DECLARE
n DBMS_XMLDOM.DOMNODE;
first_child DBMS_XMLDOM.DOMNODE;
BEGIN
first_child := DBMS_XMLDOM.getFirstChild(n);
END;
/
