I have the following XPath expression:
/configuration/properties
And this is my XML:
<configuration
xmlns="http://www.ksharma.in/myXSD">
<properties>
<property key="a" value="1" />
<property key="b" value="2" />
</properties>
</configuration>
The XPath does not work. However If I change the name space from xmlns
to xmlns:conf
it works:
<configuration
xmlns:conf="http://www.ksharma.in/myXSD">
<properties>
<property key="a" value="1" />
<property key="b" value="2" />
</properties>
</configuration>
Why is this so?