The NEWDOMDOCUMENT function creates a new, empty DOM document object. You can then set the document version and character set, create a root element, append child nodes, and finally serialize or convert it to an XMLType.
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.newDOMDocument;
Return value
The newly created DBMS_XMLDOM.DOMDOCUMENT handle.
Usage instructions
After creating a document, you typically construct the DOM tree using interfaces such as SETVERSION, SETCHARSET, CREATEELEMENT, and APPENDCHILD. After use, you should call FREEDOCUMENT to release resources.
Examples
DECLARE
doc DBMS_XMLDOM.DOMDOCUMENT;
BEGIN
doc := DBMS_XMLDOM.newDOMDocument;
DBMS_XMLDOM.freeDocument(doc);
END;
/
