XMLDOM XPath Functions
Posted: Tue Feb 06, 2007 10:07 am
Hi there,
I am using similar code to do an Xpath Query through XMLDOM
However, whenever I try and use the Xpath function:
lower-case
as listed as:
http://www.w3schools.com/xpath/xpath_functions.asp
I get an error about the function.
Are all the xpath functions supported by PHP 5?
e.g:
I am using similar code to do an Xpath Query through XMLDOM
However, whenever I try and use the Xpath function:
lower-case
as listed as:
http://www.w3schools.com/xpath/xpath_functions.asp
I get an error about the function.
Are all the xpath functions supported by PHP 5?
e.g:
Code: Select all
$xml = '<books><book><name>Blah</name></book></books>';
$doc = DOMDocument::loadXML($xml);
$xpath = new DomXpath($doc);
$query = '/books/book[contains(lower-case(name), "blah")]';