Hellihello
aber das habe ich doch bereits versucht-siehe weiter oben..
$xml_string= simplexml_load_file("http://example.com/test.xml");
$simple_xml = simplexml_load_string($xml_string);Das ist falsch, meine ich.
Richtig ist:
$simple_xml = simplexml_load_file("http://example.com/test.xml");
$query_string="//CarInfo[@Code=28]";
$node_list = $xml->xpath($query_string);
echo $node_list[0]["Quantity"];Das wiederum hängt ja nur von o.g. ab.
Dank und Gruß,
Hallo,
auch das habe ich versucht => ergebnislos...
$simple_xml = simplexml_load_file("http://example.com/test.xml");
$query_string="//CarInfo[@Code=28]";
$node_list = $simple_xml->xpath($query_string);
var_dump($node_list); // Ausgabe "array(0) { } "
echo $node_list[0]["Quantity"]; //keine Ausgabe
echo $simple_xml; //keine Ausgabe