Querying XML Data Using XQuery
Storing XML in the database is one thing; querying it efficiently is another. Prior to the xml data type in SQL Server 2005, you had to deconstruct the XML and move element and attribute data into relational columns to perform a query on the XML data residing in the text column. You could also resort to some other searching mechanism, such as character pattern matching or full-text search, neither of which provides completely reliable parsing capability. Today, XQuery provides a native and elegant way to parse and query XML data in SQL Server.
Understanding XQuery Expressions and XPath
XQuery is a language used to query and process XML data. XQuery is a W3C standard, and its specification is located at http://www.w3.org/TR/xquery/ ...
Get Programming Microsoft® SQL Server® 2012 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.