We've expanded our news coverage and improved our search! Visit
oreilly.com for the latest or search for all things across O'Reilly!
Article:
 |
|
Parsing an XML Document with XPath
|
| Subject: |
|
NodeList JDK 5.0 Update 2 |
| Date: |
|
2005-04-01 08:17:57 |
| From: |
|
dvohra09
|
|
|
|
For JDK 5.0 Update 2
replace
NodeSet nodes =
(NodeSet) xPath.evaluate(expression,
inputSource, XPathConstants.NODESET);
NodeList nodeList=(NodeList)nodes;
with
com.sun.org.apache.xml.internal.dtm.ref.DTMNodeList nodeList =
(com.sun.org.apache.xml.internal.dtm.ref.DTMNodeList) xPath.evaluate(expression,
inputSource, XPathConstants.NODESET);
|