title: Xpath Error: Can not convert #STRING to a NodeList
body: <p>In one of the API solution, incoming request is in XML format, and i need to fetch first child node tag name to make decision to run the logic. I am using xpath to get the tag name, when in am running xpath i am getting error <strong>"Can not convert #STRING to a NodeList"</strong></p>
  
  <p>I have tried with local-name and name, but both are giving same error.
  my xml is as below</p>
  
  <pre><code>&lt;p:Check xmlns:p="http://amarwayx.com.cu/WCSXMLSchema/creptonium"&gt;
              &lt;AttributeChnageLocal&gt;
                  &lt;TaskID&gt;17723&lt;/TaskID&gt;
                  &lt;BatchID&gt;12345&lt;/BatchID&gt;
                  &lt;Expiry&gt;2022-12-06&lt;/Expiry&gt; 
                  &lt;TimeStamp&gt;2019-07-20T22:45:48&lt;/TimeStamp&gt; 
              &lt;/AttributeChnageLocal&gt;
          &lt;/p:Check&gt;
  </code></pre>
  
  <p>and Xpath i used are </p>
  
  <pre><code>    local-name(/p:Check/*)
      name(/p:Check/*)
      local-name(/p:Check/*[1])
      name(/p:Check/*[1])
  </code></pre>
  
  <p>how ever is some online xpath evaluator has evaluated correct name(AttributeChnageLocal), i am not getting where the xpath syntax is wrong. 
  below is my tool snapshot.
  <a href="https://i.stack.imgur.com/N2s66.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N2s66.png" alt="enter image description here"></a></p>
  
  <p>same kind of expression works fine
  <a href="https://i.stack.imgur.com/xxVB5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xxVB5.png" alt="enter image description here"></a></p>