another xpath question

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

another xpath question

Post by yacahuma »

xpath did not like the following

Code: Select all

 
    define("XMLNS_SOAPENV", "http://schemas.xmlsoap.org/soap/envelope/");
    define("XMLNS_XSI", "http://www.w3.org/2001/XMLSchema-instance");
$xpathQuery= "//mESN[string-length()>18]/text()";     //ERRROR 
$root = simplexml_load_string('xxxx');
$root->registerXPathNamespace("a", XMLNS_SOAPENV);
$arr= $root->xpath('a:' . $xpathQuery);
 
Warning: SimpleXMLElement::xpath() [simplexmlelement.xpath]: Invalid expression in C:\tst_run_plan.php on line 151
Warning: SimpleXMLElement::xpath() [simplexmlelement.xpath]: xmlXPathEval: evaluation failed in C:\tst_run_plan.php on line 151


What is wrong with the query. It works on a x_path query test tool.
Post Reply