When casting to XML type from other SQL types, an XML value of the nearest xml schema primitive type is created. For example, xs:string for VARCHAR/CLOB and xs:date for DATE.
When casting from XML type to other SQL types, the string value of the XML instance should be compatible with the target data type. For example, xs:date value being cast to SQL DATE type.
When casting from XML type to VARCHAR or CLOB, only the UNICODE character set is supported for the target data type.
When casting to XML type, you can specify the inline length so that the resulting XML data type can be a LOB type or a nonLOB type.