xml parsing using xpath and xquery

Insastnarty

New Member
I have a xml file \[code\]<events date="30/08/2010"><event><title>here</title><description>This is first Event This is first Event This is first Event This is first Event This is first Event This is first Event This is first Event This is first Event This is first Event This is first Event</description></event></events><events date="31/08/2010"><event><title>Second Event </title><description>Second Event Second Event Second Event Second Event Second Event Second Event Second Event Second Event Second Event Second Event</description></event></events>\[/code\]from this xml how i can select the event with title Second Event using xquery.I used \[code\]$nodes = $xml->xpath('//xml/events/event[@title="'.$title.'"]');\[/code\]but it is not working, can anybody help me
 
Back
Top