Parsing an XML Document with XPath
Subject:   Fixes for JDK1.5.0_04
Date:   2005-08-17 06:39:58
From:   jimclark1
Casting to NodeSet doesen't work when evaluating a "NODESET", not sure why. However, casting to directly to a NodeList works.

NodeList nodeList = (NodeList)xPath.evaluate expression,inputSource, XPathConstants.NODESET);

Full Threads Newest First

Showing messages 1 through 3 of 3.

  • Fixes for JDK1.5.0_04
    2005-08-17 09:17:47  Deepak Vohra | [View]

    For JDK 5.0 Update 2


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

    with nodeList =
    ( xPath.evaluate(expression,
    inputSource, XPathConstants.NODESET);

  • Fixes for JDK1.5.0_04
    2005-08-17 09:23:01  Deepak Vohra | [View]

    The org.apache.xpath.NodeSet class is in xalan.jar. Is Xalan.jar in the CLASSPATH? Also add a import statement
    import org.apache.xpath.NodeSet;
    • Fixes for JDK1.5.0_04
      2007-03-08 19:47:20  SANGOD [View]

      Pls. tell me sitename for download jdk1.5.0_04
      i want setup file for installation