title: xml parsing using xpath and xquery
body: <p>I have a xml file </p>
  
  <pre><code>&lt;events date="30/08/2010"&gt;
  &lt;event&gt;
  &lt;title&gt;here&lt;/title&gt;
  &lt;description&gt;
  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
  &lt;/description&gt;
  &lt;/event&gt;
  &lt;/events&gt;
  &lt;events date="31/08/2010"&gt;
  &lt;event&gt;
  &lt;title&gt;Second Event &lt;/title&gt;
  &lt;description&gt;
  Second Event Second Event Second Event Second Event Second Event Second Event Second Event Second Event Second Event Second Event
  &lt;/description&gt;
  &lt;/event&gt;
  &lt;/events&gt;
  </code></pre>
  
  <p>from this xml how i can select the event with title  Second Event using xquery.I used </p>
  
  <pre><code>$nodes = $xml-&gt;xpath('//xml/events/event[@title="'.$title.'"]');
  </code></pre>
  
  <p>but it is not working, can anybody help me</p>