xpath won't retrieve elements

terdemoin

New Member
Here is the URL of the xml source:xml sourceI'm tryng to grab all the RichText elements using xpath relative location and then print the elementID attribute. It is outputting nothing though. Any ideas?\[code\]<?php $url = "http://testvipd7.scene7.com/is/agm/papermusepress/HOL_12_F_green?&fmt=fxgraw"; $xml = simplexml_load_file($url); //print_r($xml); $textNode = $xml->xpath("//RichText"); $count = count($textNode); $i = 0; while($i < $count){ echo '<h1>'.$textNode[$i]['s7:elementID'].'</h1>'; $i++;} ?>\[/code\]
 
Back
Top