[phpXML] Re: Searching on attributes
Brought to you by:
bs_php,
nigelswinson
From: <lu...@sa...> - 2001-10-08 16:40:48
|
Tom I read the FM several times ;-)) I tried if ( !empty($month_name) ) { $sorties = $xml->evaluate('//agenda/month[@name="$month_name"]'); } else { $sorties = $xml->evaluate('//agenda/month'); } If I use this I get a phpXML error: While parsing the XPath expression "$month_name" an empty and therefore invalid node-test has been found. The FM doesn't say what does "an empty and therefore invalid node-test has been found" mean in plain english ;-)) Luc At 23:26 06/07/01 +0000, tom...@di... wrote: >As is described (aka RTFM ;-) in the ZVON tutorial >http://www.zvon.org/xxl/XPathTutorial/General/examples.html > > > //month[@name='January'] > > >At 11:09 PM 7/6/01 +0000, lu...@sa... wrote: > >><agenda> >> <month name="January"> >> <event> >> <date/> >> <location> >> <name/> >> <address/> >> <town/> >> <country/> >> </location> >> <phone/> >> <email/> >> <web/> >> <description/> >> </event> >> </month> >> >>Thanks in advance >> >>Luc -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |