1

I am trying to upgrade some legacy code (which uses JDK 1.4) to compile with JDK 1.5. The code uses the Oracle XML parser.

The old code(with JDK 1.4) uses xmlparserv2.jar/xschema.jar from Oracle 10g release.

For the upgrade (JDK 1.5 version), I am using the xmlparserv2.jar/xschema.jar from Oracle 11.2 release.

import oracle.xml.parser.v2.XMLNode;

private static String getString(Node node, String xpath) throws XSLException
{
   try {
       return ((XMLNode) node).valueOf(xpath);
   }
   catch (...) {
   }
}

A sample xpath passed into the getString function above has the form boolean(/some/path/text()).

With JDK 1.5 and the jar file from Oracle 11.2, I am getting an error which says:

oracle.xml.xpath.XPathException: Cannot convert boolean to NodeSet.

4

0 回答 0