The CREATEELEMENT function creates an element node in the specified DOM document. The element name is specified by tagname. The created element can be converted into a generic node using MAKENODE and appended to the DOM tree using APPENDCHILD.
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.createElement (
doc IN DBMS_XMLDOM.DOMDOCUMENT,
tagname IN VARCHAR2);
Parameters
Parameters |
Explanation |
|---|---|
| doc | TargetDBMS_XMLDOM.DOMDOCUMENTHandle. |
| tagname | Element tag name. |
Return value
Handle of the DBMS_XMLDOM.DOMELEMENT element node.
Usage instructions
The created element has not been mounted to the document tree. You must use MAKENODE to convert it into a DOMNODE, and then use APPENDCHILD to append it to a parent node.
Examples
DECLARE
doc DBMS_XMLDOM.DOMDOCUMENT;
elem DBMS_XMLDOM.DOMELEMENT;
BEGIN
doc := DBMS_XMLDOM.newDOMDocument;
elem := DBMS_XMLDOM.createElement(doc, 'item');
DBMS_XMLDOM.freeDocument(doc);
END;
/
