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('presentations/slides/php5intro/book.xml');

foreach (
$books->book as $book) {
    echo 
"{$book->title} was written by {$book->author}<br>\n";
}
?>
Output
The Grapes of Wrath was written by John Steinbeck
The Pearl was written by John Steinbeck