SQL/XML is a draft standard that describes a functional integration of XML into the SQL language: it describes the ways that SQL can be used in conjunction with XML. The supported functions allow you to write queries that construct XML documents from relational data.
In SQL/XML, expressions that are not legal XML names, for example expressions that include spaces, are escaped in the same manner as the FOR XML clause. Element content of type XML is not quoted.
For more information about quoting invalid expressions, see Encoding illegal XML names.
For information about using the XML data type, see Storing XML documents in relational databases.
Using the XMLAGG function
Using the XMLCONCAT function
Using the XMLELEMENT function
Using the XMLFOREST function
Using the XMLGEN function