0

I have the following XML document:

<report>
    <ProcessorInfo
        xmlns="http://SITE/monitor"
        xmlns:SOAP="http://SITE/envelope/">
        <count>8</count>
    </ProcessorInfo>
</report>

when I try to query the following XPath: //ProcessorInfo, it says No match was found (I . If i remove the xmlns's, my issue is fixed. What is the proper XPath to use without having to remove xmlns

Bijan
  • 6,563
  • 14
  • 74
  • 130

1 Answers1

3

Try this:

//*[local-name()='ProcessorInfo']

That will remove the namespace from the search criteria.

OldProgrammer
  • 11,263
  • 3
  • 25
  • 42