snowflake.snowpark.functions.parse_xml¶
- snowflake.snowpark.functions.parse_xml(e: Union[Column, str]) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/functions.py#L6227-L6252)¶
Parse the value of the specified column as a JSON string and returns the resulting XML document.
Example:
>>> df = session.sql( ... "select (column1) as v from values ('<t1>foo<t2>bar</t2><t3></t3></t1>'), " ... "('<t1></t1>')" ... ) >>> df.select(parse_xml("v").alias("result")).show() ------------------ |"RESULT" | ------------------ |<t1> | | foo | | <t2>bar</t2> | | <t3></t3> | |</t1> | |<t1></t1> | ------------------