O'Reilly logo

Programming Microsoft® SQL Server® 2012 by Leonard Lobel and Andrew Brust

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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/ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required