Files
archived-presentations/slides/php5xml/dom_access.php
Ilia Alshanetsky bc1df0f093 PHP|Works talks.
2004-10-13 14:53:59 +00:00

9 lines
261 B
PHP

<?php
$dom = new domDocument(); // create a DOM object
$dom->load(dirname(__FILE__) . "/thedata.xml"); // load data from XML file
/* access elements by tag name */
foreach ($dom->getElementsByTagName('title') as $node) {
echo $node->nodeValue . "<br />";
}
?>