x
 
<!DOCTYPE html>
<html>
<body>
<?php
$xml=simplexml_load_file("/demo/xml/books.xml") or die("错误:无法创建对象");
echo $xml->book[0]->title . "<br>";
echo $xml->book[1]->title;
?>
</body>
</html>