Women in Technology

Hear us Roar



Article:
  Parsing an XML Document with XPath
Subject:   NodeList JDK 5.0 Update 2
Date:   2005-04-01 08:16:25
From:   dvohra09
For JDK 5.0 Update 2


replace


[code]NodeSet nodes =
(NodeSet) xPath.evaluate(expression,
inputSource, XPathConstants.NODESET);
NodeList nodeList=(NodeList)nodes;[/code]


with


[code]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);[/code]