The SETCHARSET procedure is used to set the character encoding used for serializing a DOM document. It affects the encoding information in the XML declaration and subsequent write behavior.
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.setCharset (
doc IN DBMS_XMLDOM.DOMDOCUMENT,
charset IN VARCHAR2);
Parameters
Parameters |
Explanation |
|---|---|
| doc | TargetDBMS_XMLDOM.DOMDOCUMENTHandle. |
| charset | Character set name, for example,UTF-8. |
Return value
No return value.
Usage instructions
It is typically set before calling the WRITETOBUFFER or WRITETOCLOB serialization.
Examples
DECLARE
doc DBMS_XMLDOM.DOMDOCUMENT;
BEGIN
doc := DBMS_XMLDOM.newDOMDocument;
DBMS_XMLDOM.setCharset(doc, 'UTF-8');
DBMS_XMLDOM.freeDocument(doc);
END;
/
