The GETDOCUMENTELEMENT function returns the root element node of a DOM document. This interface serves as a common entry point for traversing the element tree, reading attributes, and manipulating child nodes from a document object.
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.getDocumentElement (
doc IN DBMS_XMLDOM.DOMDOCUMENT);
Parameters
Parameters |
Explanation |
|---|---|
| doc | TargetDBMS_XMLDOM.DOMDOCUMENTHandle. |
Return value
The root element handle of DBMS_XMLDOM.DOMELEMENT.
Usage instructions
If the document has no root element, an empty handle is returned. You can use ISNULL to check whether the return value is null.
Examples
DECLARE
doc DBMS_XMLDOM.DOMDOCUMENT;
elem DBMS_XMLDOM.DOMELEMENT;
BEGIN
doc := DBMS_XMLDOM.newDOMDocument;
elem := DBMS_XMLDOM.getDocumentElement(doc);
DBMS_XMLDOM.freeDocument(doc);
END;
/
