2

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
  • 7,737
  • 18
  • 89
  • 149

1 Answers1

4

Try this:

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

That will remove the namespace from the search criteria.

OldProgrammer
  • 12,050
  • 4
  • 24
  • 45