namespace-unaware XPath expression fails if Saxon is on the CLASSPATH
问题 I have the following sample XML file: <a xmlns="http://www.foo.com"> <b> </b> </a> Using the XPath expression /foo:a/foo:b (with 'foo' properly configured in the NamespaceContext ) I can correctly count the number of b nodes and the code works both when Saxon-HE-9.4.jar is on the CLASSPATH and when it's not. When, however, I parse the same file with a namespace- unaware DocumentBuilderFactory , the XPath expression "/a/b" correctly counts the number of b nodes only when Saxon-HE-9.4.jar is