Mega Code Archive
Get element by tag name
getElementsByTagName("book");
foreach($books as $book) {
$titles = $book->getElementsByTagName("title");
foreach($titles as $title) {
echo $title->nodeValue . " - ";
}
$id = $book->getAttribute("book_id");
echo "book_id = $id\n";
}
?>