function _handleFunction_contains
Brought to you by:
bs_php,
nigelswinson
From: ktt <kes...@ya...> - 2004-03-28 01:49:37
|
I have an XML file like <orchard> <flora> <flower>red</flower> <stem>green</stem> </flora> <flora> <flower>red</flower> <stem>pale</stem> </flora> <flora> <flower>blue</flower> <stem>pale</stem> </flora> </orchard> The aim is to display all <flora> nodes if subnode of it has a value "red". I would like to use function _handleFunction_contains($arguments, $context) and use a query "//flora[contains(.,'red')]" . But the dificulty is how to pass a query "//flora[contains(.,'red')]" to function, and that is a $context? I'm new to PHP.XPath.. Thank you in advance. ktt __________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html |