© Peter A. Carter  2018
Peter A. CarterSQL Server Advanced Data Typeshttps://doi.org/10.1007/978-1-4842-3901-8_4

4. Querying and Shredding XML

Peter A. Carter1 
(1)
London, UK
 

To allow developers to query and navigate XML documents from within SQL Server, the XQuery language can be combined with T-SQL queries. In this chapter, I will discuss how to use XQuery to filter, extract, and modify XML. I will also discuss shredding XML, which is the process of converting XML data into relational results sets. Finally, an overview of how to bind an XSD schema to a column of data type XML is provided.

Querying XML

XQuery is a language for querying XML, in the same way that SQL is a language for querying relational data. The language is built on XPath but has ...

Get SQL Server Advanced Data Types: JSON, XML, and Beyond now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.