title: xpath query to select nodes with and condition
body: <pre><code>&lt;?xml version="1.0"?&gt;  
  &lt;AppXmlLogWritter&gt;  
    &lt;LogData&gt;  
      &lt;LogID&gt;235820130202134128634953894887814709273&lt;/LogID&gt;  
      &lt;LogDateTime&gt;20130202134128&lt;/LogDateTime&gt;  
      &lt;LogType&gt;Warning&lt;/LogType&gt;  
      &lt;LogFlag&gt;PACSFlag&lt;/LogFlag&gt;  
      &lt;LogApplication&gt;PACSLogApplication&lt;/LogApplication&gt;  
      &lt;LogModule&gt;PACSLogModule&lt;/LogModule&gt;  
      &lt;LogLocation&gt;PACSLogLocation&lt;/LogLocation&gt;  
      &lt;LogText&gt;PACSLogText&lt;/LogText&gt;  
    &lt;/LogData&gt;  
    &lt;LogData&gt;  
      &lt;LogID&gt;2358201302021341286349538948878147093861&lt;/LogID&gt;  
      &lt;LogDateTime&gt;20130202134128&lt;/LogDateTime&gt;  
      &lt;LogType&gt;Error&lt;/LogType&gt;  
      &lt;LogFlag&gt;PACSFlag&lt;/LogFlag&gt;  
      &lt;LogApplication&gt;PACSLogApplication&lt;/LogApplication&gt;  
      &lt;LogModule&gt;PACSLogModule&lt;/LogModule&gt;  
      &lt;LogLocation&gt;PACSLogLocation&lt;/LogLocation&gt;  
      &lt;LogText&gt;PACSLogText&lt;/LogText&gt;  
    &lt;/LogData&gt;      
  &lt;/AppXmlLogWritter&gt;  
  </code></pre>
  
  <p>Get Nodes having LogApplication starts with 'P' and positon &lt;=1 and >=2</p>
  
  <blockquote>
    <p>/AppXmlLogWritter/ LogData[LogApplication/text()[starts-with(. , 'P')]]and LogData[position()&lt;=1 and position()>=2]</p>
  </blockquote>
  
  <p>i have written above query but fails</p>