-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
1.1, 5.0
-
x86
-
linux, windows_2000
A DESCRIPTION OF THE PROBLEM :
says
"
Using the XPath API
The following example demonstrates using the XPath API to select one or more nodes from an XML document:
XPath xpath = XPathFactory.newInstance().newXPath();
String expression = "/widgets/widget";
InputSource inputSource = new InputSource("widgets.xml");
NodeSet nodes = (NodeSet) xpath.evaluate(expression, inputSource, XPathConstants.NODESET);
"
but in the example the type NodeSet should be NodeList (2 places) (even tho' the enum is XPathConstants.NODESET) There is no class NodeSet in J2SE 5.0
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/xpath/package-summary.html
###@###.### 2005-04-06 10:42:51 GMT
says
"
Using the XPath API
The following example demonstrates using the XPath API to select one or more nodes from an XML document:
XPath xpath = XPathFactory.newInstance().newXPath();
String expression = "/widgets/widget";
InputSource inputSource = new InputSource("widgets.xml");
NodeSet nodes = (NodeSet) xpath.evaluate(expression, inputSource, XPathConstants.NODESET);
"
but in the example the type NodeSet should be NodeList (2 places) (even tho' the enum is XPathConstants.NODESET) There is no class NodeSet in J2SE 5.0
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/xpath/package-summary.html
###@###.### 2005-04-06 10:42:51 GMT
- duplicates
-
JDK-6355823 Example in javax.xml.xpath package.html should use NodeList instead of NodeSet
-
- Resolved
-