Merlin Morgenstern wrote:
ok... it seems that I am doing something fundamentally wrong. I get no
output at all with this:
$xmlStr = file_get_contents($filename);
$xmlelement = new SimpleXMLElement($xmlStr);
echo
'$xmlelement->xpath("//anbieter/immobilie/anhaenge/anha...@location='INTERN'
and @gruppe='TITELBILD']/daten/anhanginhalt");
The names and structure seems fine. The syntax according to your posting
and php.net also.
Any ideas?
yup echo in the wrong place, try:
$xmlStr = file_get_contents($filename);
$xmlelement = new SimpleXMLElement($xmlStr);
$result =
$xmlelement->xpath("//anbieter/immobilie/anhaenge/anha...@location='INTERN'
and @gruppe='TITELBILD']/daten/anhanginhalt");
while(list( , $node) = each($result)) {
print_r($node);
}
failing that, keep shortening the xpath query till you get one that
works then go from there
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php