ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
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);