The specification defines the data type XML, functions for working with XML, including element construction, mapping data from relational tables, combining XML fragments, and embedding XQuery expressions in SQL statements. Functions which can be embedded include XMLQUERY (which extracts XML or values from an XML field) and XMLEXISTS (which predicates whether an XQuery expression is matched).
Further information and examples of the SQL/XML functions are provided in the external links below234.
The result of Wagner's objective evaluation of the SQL/XML:2006 standard compliance of Oracle 11g Release 1, MS SQL Server 2008 and MySQL 5.1.30 is shown in the following table5, to which the data for PostgreSQL 9.1,67 and IBM DB2 has been added:
The sample SQLXML query below has SQLXML type as output(tested on DB2 9.7 and Oracle 11g):
And the output:
Samples are taken from javalobby article8.
Funderburk, J. E.; Malaika, S.; Reinwald, B. (2002), "XML programming with SQL/XML and XQuery" (PDF), IBM Systems Journal, 41 (4): 642–665, doi:10.1147/sj.414.0642, retrieved 14 November 2011 http://ict.udlap.mx/people/carlos/is346/files/reinwald.pdf ↩
Wagner, Michael (2010), "1. Auflage", SQL/XML:2006 - Evaluierung der Standardkonformität ausgewählter Datenbanksysteme, Diplomica Verlag, ISBN 978-3-8366-9609-8 978-3-8366-9609-8 ↩
Eisenberg, Andrew; Melton, Jim (2004), "Advancements in SQL/XML" (PDF), SIGMOD Record, 33 (3): 79, doi:10.1145/1031570.1031588, retrieved 14 November 2011 http://www.sigmod.org/publications/sigmod-record/0409/11.JimMelton.pdf ↩
Eisenberg, Andrew; Melton, Jim (2002), "SQL/XML is Making Good Progress" (PDF), SIGMOD Record, 31 (2): 101, CiteSeerX 10.1.1.109.4867, doi:10.1145/565117.565141, retrieved 14 November 2011 http://www.sigmod.org/publications/sigmod-record/0206/standard.pdf ↩
PostgreSQL Conformance with ISO 9075-14 (SQL/XML), at PostgreSQL 9.1 documentation. http://www.postgresql.org/docs/9.1/static/features.html ↩
PostgreSQL 9.1 XML functions, at PostgreSQL 9.1 documentation. http://www.postgresql.org/docs/current/static/functions-xml.html ↩
Kec, Daniel (2013), SQLX - From DB Straight to XML and Back, Javalobby.org ↩