I've trying to run a simple XPath query
//z:row
in Java against against the following XML.
<?xml version="1.0" encoding="utf-8"?>
<test xmlns:rs="urn:schemas-microsoft-com:rowset"
xmlns:z="#RowsetSchema">
<rs:data>
<z:row>XX</z:row>
</rs:data>
</test>
I've written my own namespace prefix resolver, and also used the NamespaceContext object at the end of this example [http://www.ibm.com/developerworks/xml/library/x-nmspccontext/index.html?ca=drs-|http://www.ibm.com/developerworks/xml/library/x-nmspccontext/index.html?ca=drs-]
The problem is that I also get the following error:
javax.xml.transform.TransformerException:A location step was expected following the '/' or '//' token.
The problem is the *#* sign in the
xmlns:z="#RowsetSchema". If I rename the namespace to be just
xmlns:z="RowsetSchema" then it works fine.
Help, this is driving me mad.
TIA
Ian