Building XML
摘要
XML is represented in SQL Server using a complex data type that has special syntax and a well-defined format. It can be used when we need to construct XML-formatted output or shred existing XML into relational format. In this chapter, I will provide recipes for building XML from a result set based on one or more tables and for formatting and presenting the result as XML output.