Consider the following XML code:
PHP 5 Power Programming
Learning PHP 5
Which of the following SimpleXML calls print the name of the second book?
(Let $xml=simplexml_load_file("books.xml");) (Choose 2)
echo $xml->books->book[2];
echo $xml->books->book[1];
echo $xml->book[1];
echo $xml->xpath("/books/book[@id=2]");
$c = $xml->children(); echo $c[1];
Submit