Why Store XML Data in SQL Server 2005

 

Introducing XPath and XQuery

Before jumping into SQL Server and ADO.NET features, it's important to briefly introduce two XML technologies that are used throughout this chapter: XPath and XQuery.

XPath, which is also known as XML Path Language, is an XML technology that was created to provide a common syntax and semantics to address parts of an XML document. XPath has been a W3C (http://www.w3c.org) recommendation since November 1999.

XPath uses a path notation for navigating through the hierarchical structure of an XML document; the notation is similar to the way you navigate the folder hierarchy on your disk drive when you are locating a file. Just as you can locate a file by specifying a relative or explicit path, you can locate parts of an XML document by supplying a relative or explicit path. Even the asterisk (*) is useable as the "all" wildcard when locating parts of an XML document.

XQuery, which is also known as XML Query, provides flexible query facilities to extract data from real and virtual XML documents. XQuery 1.0 is an extension of XPath 2.0, which means that any pattern-matching expression that you use in XPath to locate parts of an XML document can also be used in XQuery. XQuery also provides variables, functions, and operators that can be used with the XML data, plus XML serialization and a Data Model. The Data Model precisely defines the information that can be contained in the input to the XQuery processor. In addition, the Data Model also defines all permissible values of expressions in the XQuery language.

 


Programming Microsoft ADO. NET 2.0 Applications. Advanced Topics
Linux Application Development (2nd Edition)
ISBN: 735621411
EAN: 2147483647
Year: 2004
Pages: 85

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net