title: Logic app get value from node with attributes using XPath
body: <p>I am working in a logic app that retrieve values from an XML. I was working initially with this XML structure:</p>
  
  <pre><code>&lt;Parent&gt;
      &lt;Child1&gt;Hello&lt;/Child1&gt;
      &lt;Child2&gt;World&lt;/Child2&gt;
  &lt;/Parent&gt;
  </code></pre>
  
  <p>And I was able to retrieve the values by using this XPath expression (this is inside of a For_Each action):</p>
  
  <pre><code>"@{xpath(xml(items('For_each_node')), 'string(/*[local-name()=\"Parent\"]/*[local-name()=\"Child1\"])')}"
  </code></pre>
  
  <p>It works great and I get 'Hello' in this example, however I've been given now this XML:</p>
  
  <pre><code>&lt;Parent&gt;
    &lt;Child N="1"&gt;Hello&lt;/Child&gt;
    &lt;Child N="2"&gt;World&lt;/Child&gt;
  &lt;/Parent&gt;
  </code></pre>
  
  <p>And now the expression placed above retrieves nothing. I think I need to adjust the expression to do something like 'retrieve node value where child attribute equals 1' but I am not able to make it work, I've seen examples on how to do that but somehow the syntax used in Logic apps for XPath is kind of different as how 'standard' XPath is used.</p>
  
  <p>I would appreciate your help, thanks!</p>