PARSE_XML

functionsupportedCore SQL functions

docs.snowflake.com ↗

Semi-structured and structured data functions

Interprets an input string as an XML document, producing an OBJECT value. If the input is NULL, the output is NULL.

Syntax

supportedpartialnot supportednot scored

PARSE_XML( <string_containing_xml> [ , <disable_auto_convert> ] )
PARSE_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_convertoptionalA Boolean expression that specifies whether or not the function should attempt to convert numeric and Boolean values in string_containing_xml to Snowflake data types. (For details about this conversion, see Usage Notes below.) If you don’t want the function to convert these values, set this argument to TRUE. This setting has an effect that is similar to the DISABLE_AUTO_CONVERT parameter in CREATE FILE FORMAT. If you want the function to convert these values, set this argument to FALSE or omit this argument. Default: FALSE

Returns

The data type of the returned value is OBJECT. The OBJECT contains an internal representation of the XML.

Usage notes

See also

Referenced by