The CONVERT function converts the XML data into escaped or unescaped XML equivalents and returns CLOB or VARCHAR2 data in an encoded or decoded format.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
Syntax
The current OceanBase Database version supports XML data in the string or CLOB form. The syntax is as follows:
DBMS_XMLGEN.CONVERT (
xmlData IN VARCHAR2,
flag IN NUMBER := ENTITY_ENCODE)
RETURN VARCHAR2;
DBMS_XMLGEN.CONVERT (
xmlData IN CLOB,
flag IN NUMBER := ENTITY_ENCODE)
RETURN CLOB;
Parameters
| Parameter | Description |
|---|---|
| xmlData | The XML CLOB data to be encoded or decoded. |
| flag | The encoding/decoding flag.
|
Considerations
If flag is set to ENTITY_ENCODE, this function escapes XML data.
For example, the character > is escaped into >.
Unescaping is the reverse transformation.