CHECK_XML

functionsupportedCore SQL functions

docs.snowflake.com ↗

Semi-structured and structured data functions

Checks the validity of an XML document. If the input string is NULL or a valid XML document, the output is NULL. In case of an XML parsing error, the output string contains the error message.

Syntax

supportedpartialnot supportednot scored

CHECK_XML( <string_containing_xml> [ , <disable_auto_convert> ] )
CHECK_XML( STR => <string_containing_xml>
  [ , DISABLE_AUTO_CONVERT => <disable_auto_convert> ] )

Parameters

NameRequiredDescription
string_containing_xml OR STR => string_containing_xmlrequiredSpecify an expression that evaluates to a VARCHAR value that contains valid XML.
disable_auto_convert OR DISABLE_AUTO_CONVERT => disable_auto_convertoptionalSpecify the same value that you pass to the PARSE_XML function. Default: FALSE

Returns

The data type of the returned value is VARCHAR.

Usage notes

See also

Referenced by