No more SAX parsing and we get DTD validation and XPath queries

Book XML File
<books>
  <book>
    <title>The Grapes of Wrath</title>
    <author>John Steinbeck</author>
  </book>
  <book>
    <title>The Pearl</title>
    <author>John Steinbeck</author>
  </book>
</books>
Book PHP File
<?php
$books 
simplexml_load_file('book.xml');

foreach (
$books->book as $book) {
  echo 
"{$book->title} was written 
        by 
{$book->author}<br>\n";
}
?>