XML Query

The W3C has released the XQuery specification (http://www.w3.org/XML/query ), which promises to enable the querying of XML documents in the same way that you can query a SQL database. Here's an example of XQuery syntax applicable to our review document:

document("review1.xml")/BODY/REVIEW

This XQuery statement returns all the reviews referred to in the body of the XML document review1.xml.

The syntax of the XQuery language is built around the XPath representation of XML data structures. The XQuery language also provides for complex instructions within queries. For instance, you process through a corpus of XML documents, returning the titles and abstracts only for those that meet a certain set of criteria. This functionality mirrors ...

Get XML and SQL: Developing Web Applications 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.