Hi,
    I am using XPath features from xalan.jar v1.2.1, and i am getting
AbstractMethodError. I am passing 2 parameters to the method. First
parameter is xpath string to search for and second parameter is starting
point(node) in the xml file.
Does anybody encountered this error?
Here is code which i am trying:


                    /* XPathHelper. java */
    XPathContext xPathContext = new XPathContext();
    XPathParser xPathParser = new
XPathParser(xPathContext.getErrorListener() ,
PathContext.getSAXLocator());
    PrefixResolver prefixResolver;
    Compiler defaultCompiler = new
Compiler(xPathContext.getErrorListener() ,
xPathContext.getSAXLocator());

   public void processXPath(String xPath, Node target) throws Exception
   {
      prefixResolver = new PrefixResolverDefault(target);

      // create the XPath and initialize it
      XPath xp = new XPath(xPath, null, prefixResolver, XPath.SELECT);
      xPathParser.initXPath(defaultCompiler, xPath, prefixResolver);

      // now execute the XPath select statement
      XObject list = xp.execute(xPathContext, target, prefixResolver);

      NodeSet nodeSet = list.mutableNodeset(); //  line 64 , here i get
error at runtime
   }

Here  is the error stack trace:

java.lang.AbstractMethodError

 at
org.apache.xpath.axes.RootWalkerMultiStep.getNextNode(RootWalkerMultiStep.java:108)

 at
org.apache.xpath.axes.ChildWalkerMultiStep.nextNode(ChildWalkerMultiStep.java:147)

 at
org.apache.xpath.axes.LocPathIterator.nextNode(LocPathIterator.java:689)

 at org.apache.xpath.NodeSet.addNodes(NodeSet.java:550)

 at org.apache.xpath.NodeSet.<init>(NodeSet.java:154)

 at org.apache.xpath.objects.XNodeSet.mutableNodeset(XNodeSet.java:291)

 at XPathHelper.processXPath(XPathHelper.java:64)


Appreciated.

Thanks.
Neeraj
begin:vcard 
n:Singh;Neeraj
tel;cell:415-987-6700
tel;fax:415-892-7085
tel;home:415-472-6998
tel;work:415-209-6800x122
x-mozilla-html:FALSE
url:www.RadiantLogic.com
org:Radiant Logic Inc.;Java Development
adr:;;1682 Novato Blvd, #300;Novato;California;94947;United States
version:2.1
email;internet:[EMAIL PROTECTED]
title:Developer 
fn:Neeraj
end:vcard

Reply via email to