Implementing condition in XPath [duplicate]

Specify the date in the xpath expression,

i.e.

$nodes = $xml->xpath('//xml/events[@date="14/12/2011"]');

would select only the last events-node in the example

Leave a Comment