XPath DOM Query$dom = new DomDocument(); $dom -> load( "food.xml" );$xp = new DomXPath( $dom ); $fruits = $xp -> query( "/food/fruit/item" );foreach($fruits as $node){ echo( "" . $node -> textContent . "" );}echo( "" );?>