title: find a value of a sibling node in xml file with ant xmltask
body: <p>I have the following xml block (a standard jboss web.xml file) :</p>
  
  <pre><code>&lt;web-app&gt;
    &lt;servlet&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;checkInterval&lt;/param-name&gt;
        &lt;param-value&gt;-1&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;reloading&lt;/param-name&gt;
        &lt;param-value&gt;false&lt;/param-value&gt;
      &lt;/init-param&gt;
      .
      .
      .
    &lt;/servlet&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>i want to select <code>&lt;param-value&gt;</code> of <code>&lt;init-param&gt;</code> with <code>&lt;param-name&gt;=checkInterval</code> and copy it. there are multiple (different) <code>&lt;init-params&gt;</code> so i need to choose it dynamically.</p>
  
  <p>I have tried the following:</p>
  
  <pre><code>&lt;target name="default" description="description"&gt;       
          &lt;xmltask source="web.xml" dest="web_edited.xml"&gt;
              &lt;copy path='/web-app/servlet/init-param[param-name="checkInterval"]/param-value/text()' property='property1' /&gt;     
          &lt;/xmltask&gt;
          &lt;echo&gt;${property1}&lt;/echo&gt;
  
  &lt;/target&gt;
  </code></pre>
  
  <p>expected result is -1, but instead the property is undefined.
  any idea ?</p>