<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Examples</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="dom.constants.html">Predefined Constants</a></div> <div class="next" style="text-align: right; float: right;"><a href="class.domattr.html">DOMAttr</a></div> <div class="up"><a href="book.dom.html">DOM</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="dom.examples" class="chapter"> <h1>Examples</h1> <p class="para"> Many examples in this reference require an XML file. We will use <var class="filename">book.xml</var> that contains the following: </p> <p class="para"> <div class="example" id="example-5393"> <p><strong>Example #1 book.xml</strong></p> <div class="example-contents"> <div class="xmlcode"><pre class="xmlcode"><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ ]> <book id="listing"> <title>My lists</title> <chapter id="books"> <title>My books</title> <para> <informaltable> <tgroup cols="4"> <thead> <row> <entry>Title</entry> <entry>Author</entry> <entry>Language</entry> <entry>ISBN</entry> </row> </thead> <tbody> <row> <entry>The Grapes of Wrath</entry> <entry>John Steinbeck</entry> <entry>en</entry> <entry>0140186409</entry> </row> <row> <entry>The Pearl</entry> <entry>John Steinbeck</entry> <entry>en</entry> <entry>014017737X</entry> </row> <row> <entry>Samarcande</entry> <entry>Amine Maalouf</entry> <entry>fr</entry> <entry>2253051209</entry> </row> <!-- TODO: I have a lot of remaining books to add.. --> </tbody> </tgroup> </informaltable> </para> </chapter> </book></pre> </div> </div> </div> </p> </div> <hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="dom.constants.html">Predefined Constants</a></div> <div class="next" style="text-align: right; float: right;"><a href="class.domattr.html">DOMAttr</a></div> <div class="up"><a href="book.dom.html">DOM</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>