The CREATE TEXTNODE function creates a text node in the specified DOM document. The text content is specified by data. This node can be appended to the DOM tree as a child node of an element node.
Applicability
This topic 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.createTextNode (
doc IN DBMS_XMLDOM.DOMDOCUMENT,
data IN VARCHAR2);
Parameters
Parameters |
Explanation |
|---|---|
| doc | TargetDBMS_XMLDOM.DOMDOCUMENTHandle. |
| data | Text node content. |
Return value
Handle of the DBMS_XMLDOM.DOMTEXT text node.
Usage instructions
The created text node is typically converted to a DOMNODE using MAKENODE, and then appended under an element node using APPENDCHILD.
Examples
DECLARE
doc DBMS_XMLDOM.DOMDOCUMENT;
text DBMS_XMLDOM.DOMTEXT;
BEGIN
doc := DBMS_XMLDOM.newDOMDocument;
text := DBMS_XMLDOM.createTextNode(doc, 'hello');
DBMS_XMLDOM.freeDocument(doc);
END;
/
