The CONVERT function converts XML data to its escaped or unescaped equivalent and returns the result as CLOB or VARCHAR2 data in encoded or decoded format.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
OceanBase Database supports XML data in string and CLOB formats in the current version. 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 encode or decode. |
| flag | The flag.
|
Considerations
If the flag parameter is set to ENTITY_ENCODE, this function escapes the XML data.
For example, the escaped form of the character > is >.
Unescaped means the reverse conversion.
