-- from_xml
SELECT from_xml('<p><a>1</a><b>0.8</b></p>', 'a INT, b DOUBLE');
+-----------------------------------+
|from_xml(<p><a>1</a><b>0.8</b></p>)|
+-----------------------------------+
|                           {1, 0.8}|
+-----------------------------------+

SELECT from_xml('<p><time>26/08/2015</time></p>', 'time Timestamp', map('timestampFormat', 'dd/MM/yyyy'));
+----------------------------------------+
|from_xml(<p><time>26/08/2015</time></p>)|
+----------------------------------------+
|                    {2015-08-26 00:00...|
+----------------------------------------+

SELECT from_xml('<p><teacher>Alice</teacher><student><name>Bob</name><rank>1</rank></student><student><name>Charlie</name><rank>2</rank></student></p>', 'STRUCT<teacher: STRING, student: ARRAY<STRUCT<name: STRING, rank: INT>>>');
+-----------------------------------------------------------------------------------------------------------------------------------------------+
|from_xml(<p><teacher>Alice</teacher><student><name>Bob</name><rank>1</rank></student><student><name>Charlie</name><rank>2</rank></student></p>)|
+-----------------------------------------------------------------------------------------------------------------------------------------------+
|                                                                                                                           {Alice, [{Bob, 1}...|
+-----------------------------------------------------------------------------------------------------------------------------------------------+

-- schema_of_xml
SELECT schema_of_xml('<p><a>1</a></p>');
+------------------------------+
|schema_of_xml(<p><a>1</a></p>)|
+------------------------------+
|             STRUCT<a: BIGINT>|
+------------------------------+

SELECT schema_of_xml('<p><a attr="2">1</a><a>3</a></p>', map('excludeAttribute', 'true'));
+-----------------------------------------------+
|schema_of_xml(<p><a attr="2">1</a><a>3</a></p>)|
+-----------------------------------------------+
|                           STRUCT<a: ARRAY<B...|
+-----------------------------------------------+

-- to_xml
SELECT to_xml(named_struct('a', 1, 'b', 2));
+--------------------------------+
|to_xml(named_struct(a, 1, b, 2))|
+--------------------------------+
|            <ROW>\n    <a>1</...|
+--------------------------------+

SELECT to_xml(named_struct('time', to_timestamp('2015-08-26', 'yyyy-MM-dd')), map('timestampFormat', 'dd/MM/yyyy'));
+----------------------------------------------------------------+
|to_xml(named_struct(time, to_timestamp(2015-08-26, yyyy-MM-dd)))|
+----------------------------------------------------------------+
|                                            <ROW>\n    <time>...|
+----------------------------------------------------------------+

-- xpath
SELECT xpath('<a><b>b1</b><b>b2</b><b>b3</b><c>c1</c><c>c2</c></a>','a/b/text()');
+-----------------------------------------------------------------------+
|xpath(<a><b>b1</b><b>b2</b><b>b3</b><c>c1</c><c>c2</c></a>, a/b/text())|
+-----------------------------------------------------------------------+
|                                                           [b1, b2, b3]|
+-----------------------------------------------------------------------+

-- xpath_boolean
SELECT xpath_boolean('<a><b>1</b></a>','a/b');
+-----------------------------------+
|xpath_boolean(<a><b>1</b></a>, a/b)|
+-----------------------------------+
|                               true|
+-----------------------------------+

-- xpath_double
SELECT xpath_double('<a><b>1</b><b>2</b></a>', 'sum(a/b)');
+-----------------------------------------------+
|xpath_double(<a><b>1</b><b>2</b></a>, sum(a/b))|
+-----------------------------------------------+
|                                            3.0|
+-----------------------------------------------+

-- xpath_float
SELECT xpath_float('<a><b>1</b><b>2</b></a>', 'sum(a/b)');
+----------------------------------------------+
|xpath_float(<a><b>1</b><b>2</b></a>, sum(a/b))|
+----------------------------------------------+
|                                           3.0|
+----------------------------------------------+

-- xpath_int
SELECT xpath_int('<a><b>1</b><b>2</b></a>', 'sum(a/b)');
+--------------------------------------------+
|xpath_int(<a><b>1</b><b>2</b></a>, sum(a/b))|
+--------------------------------------------+
|                                           3|
+--------------------------------------------+

-- xpath_long
SELECT xpath_long('<a><b>1</b><b>2</b></a>', 'sum(a/b)');
+---------------------------------------------+
|xpath_long(<a><b>1</b><b>2</b></a>, sum(a/b))|
+---------------------------------------------+
|                                            3|
+---------------------------------------------+

-- xpath_number
SELECT xpath_number('<a><b>1</b><b>2</b></a>', 'sum(a/b)');
+-----------------------------------------------+
|xpath_number(<a><b>1</b><b>2</b></a>, sum(a/b))|
+-----------------------------------------------+
|                                            3.0|
+-----------------------------------------------+

-- xpath_short
SELECT xpath_short('<a><b>1</b><b>2</b></a>', 'sum(a/b)');
+----------------------------------------------+
|xpath_short(<a><b>1</b><b>2</b></a>, sum(a/b))|
+----------------------------------------------+
|                                             3|
+----------------------------------------------+

-- xpath_string
SELECT xpath_string('<a><b>b</b><c>cc</c></a>','a/c');
+-------------------------------------------+
|xpath_string(<a><b>b</b><c>cc</c></a>, a/c)|
+-------------------------------------------+
|                                         cc|
+-------------------------------------------+