O'Reilly logo

XQuery from the Experts: A Guide to the W3C XML Query Language by Philip Wadler, Jim Tivy, Jérôme Siméon, Michael Rys, Jonathan Robie, Michael Kay, Mary Fernández, Denise Draper, Don Chamberlin, Howard Katz - Editor

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

What Is XML Data?

XML data can be understood at two levels: the textual representation, and the model of this data as a tree of nodes.

XML as Text

XML is often seen in its textual form. As text, XML may be viewed in any text editor and easily passed around the World Wide Web using text-based protocols such as HTTP. The example below shows some XML text. Note the tags Person and FirstName. Such tags give names to the data.

<?xml version="1.0"?>
<Person id="12">
   <FirstName>John</FirstName>
   <LastName>Smith</LastName>
<Person>

XML Data Model

In a rough sense, the XML data model (XML Infoset [INFOSET]) describes XML as a tree of data. The XQuery data model is essentially this same tree definition with some important additions, such as sequences ...

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