array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'fr', ), 'this' => array ( 0 => 'dom.examples.php', 1 => 'Exemples', ), 'up' => array ( 0 => 'book.dom.php', 1 => 'DOM', ), 'prev' => array ( 0 => 'dom.constants.php', 1 => 'Constantes pré-définies', ), 'next' => array ( 0 => 'class.domattr.php', 1 => 'DOMAttr', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'fr', 'path' => 'reference/dom/examples.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
Beaucoup d'exemples de cette documentation requièrent un fichier XML. Nous allons utiliser le fichier book.xml qui contient les élements suivants :
Exemple #1 book.xml
<?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>