O'Reilly logo

PHP 5 Power Programming by Derick Rethans, Stig Sæther Bakken, Andi Gutmans

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

8.2. Vocabulary

When working with XML documents, you will encounter several terms that might be unfamiliar. The following example shows an XML document that is an XHTML document:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>XML Example</title>
  </head>
  <body background="bg.png">
    <p>
      Moved to <a href="http://example.org/">example.org</a>.
      <br />
      foo &amp; bar
    </p>
  </body>
</html>

The first line is the XML declaration; it specifies the XML version and the XML file encoding. Notice that the line starts with <?. This combination of characters can ...

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