Structure and Syntax

All XML documents begin with a version declaration that looks something like Example A-3:

Example A-3. Version declaration
<?xml version="1.0"?>

Version declarations are a special kind of XML tag called a processing instruction. Processing instructions aren't really part of the XML information—they're instructions for whatever application is processing the XML document. As of this writing, there's only one version of XML out there, and that's 1.0.

Besides the version declaration, all XML documents have a root element. This element contains all other elements in the document. In the example we've been using, customer_list is the root element. There can only be one root element. For example, Example A-4 is not well-formed ...

Get Advanced JavaScript™: Insights and Innovative Techniques 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.