XML Document Syntax

Now let’s look at some of the particulars of XML syntax using this simple XML document:

<?xml version="1.0" encoding="US-ASCII" standalone="no"?>
<!DOCTYPE accounts SYSTEM "simple.dtd">
<accounts>
<customer>
    <name>
        <firstname>Bobby</firstname>
        <lastname>Five</lastname>
    </name>
    <accountNumber>4456</accountNumber>
    <balance>111.32</balance>
</customer>
<!-- more customers will be added soon -->
<?php  print date ('Fj,Y') ?>
</accounts>

Tip

Because XHTML is an XML application, all of the following syntax conventions apply to web documents written in XHTML.

Get Web Design in a Nutshell, 3rd Edition 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.