title: How to iterate XQuery Path?
body: <pre><code>&lt;Response xmlns="https://**********/token"&gt;
     &lt;rows&gt;
        &lt;e&gt;
           &lt;e&gt;1,4507&lt;/e&gt;
           &lt;e&gt;1&lt;/e&gt;
           &lt;e&gt;2017-02-28T05:10:32.0606654Z&lt;/e&gt;
           &lt;e&gt;2017-02-28T05:10:32.2267838Z&lt;/e&gt;
           &lt;e&gt;Depart&lt;/e&gt;
           &lt;e&gt;Depart&lt;/e&gt;
           &lt;e&gt;acct: xxx on 10/2/2015&lt;/e&gt;
           &lt;e&gt;16.666131292069704&lt;/e&gt;
           &lt;e null="true"/&gt;
           &lt;e&gt;Open&lt;/e&gt;
           &lt;e null="true"/&gt;
           &lt;e null="true"/&gt;
           &lt;e null="true"/&gt;
        &lt;/e&gt;
        &lt;e&gt;
           &lt;e&gt;1,4507&lt;/e&gt;
           &lt;e&gt;2&lt;/e&gt;
           &lt;e&gt;2017-02-28T05:10:32.0606654Z&lt;/e&gt;
           &lt;e&gt;2017-02-28T05:10:32.2267838Z&lt;/e&gt;
           &lt;e&gt;Depart&lt;/e&gt;
           &lt;e&gt;Depart&lt;/e&gt;
           &lt;e&gt;acct: xxx on 10/2/2015&lt;/e&gt;
           &lt;e&gt;16.666131292069704&lt;/e&gt;
           &lt;e null="true"/&gt;
           &lt;e&gt;Open&lt;/e&gt;
           &lt;e null="true"/&gt;
           &lt;e null="true"/&gt;
           &lt;e null="true"/&gt;
        &lt;/e&gt;
     &lt;/rows&gt;
     &lt;skip&gt;0&lt;/skip&gt;
     &lt;take&gt;126&lt;/take&gt;
  &lt;/Response&gt;
  </code></pre>
  
  <p>The above is my xml response:</p>
  
  <p>I wanted to verify each row that status is Open. </p>
  
  <p>Open</p>
  
  <pre><code>declare namespace ns1='https://**********/token';
  &lt;Result&gt;
  for  $x in //ns1:Response[1]/ns1:rows[1]
  return data($x/ns1:e[1]/ns1:e[10]/text())
  &lt;/Result&gt;
  </code></pre>
  
  <p>but it is not returning the value.. It just gives the following in the expected result. </p>
  
  <pre><code>&lt;Result&gt;for  $x in //ns1:Response[1]/ns1:rows[1]
  return data($x/ns1:e[1]/ns1:e[2]/text())&lt;/Result&gt;
  </code></pre>
  
  <p>Is it correct xquery expression? would be helpful if some check this?</p>