NetKernel APIs


org.ten60.netkernel.xml.xda
Class DOMXPathImplementation

java.lang.Object
  extended byorg.ten60.netkernel.xml.xda.DOMXPathImplementation
All Implemented Interfaces:
IXPathImplementation

public class DOMXPathImplementation
extends Object
implements IXPathImplementation

Wrapper around evaluation of xpaths using xalan. An attempt is made to minimise memory usage by reusing contexts and caching last node id and parsed xpath.


Constructor Summary
DOMXPathImplementation()
          Creates a new instance of XPathAPIWrapper
 
Method Summary
 IXPathResult eval(Object aContextNode, String aXPath)
          Evaluates an xpath expression on the given context node
 org.apache.xml.utils.PrefixResolver getPrefixResolver()
           
 void reset()
          reset the evaluator after the document has changed
 void resetPrefixResolver()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMXPathImplementation

public DOMXPathImplementation()
Creates a new instance of XPathAPIWrapper

Method Detail

eval

public final IXPathResult eval(Object aContextNode,
                               String aXPath)
                        throws XPathImplementationException
Evaluates an xpath expression on the given context node

Specified by:
eval in interface IXPathImplementation
Parameters:
aContextNode - an implementation specific context object
aXPath - an xpath into the document
Throws:
XPathImplementationException - thrown if the evaluation fails for any reason

reset

public void reset()
reset the evaluator after the document has changed

Specified by:
reset in interface IXPathImplementation

resetPrefixResolver

public void resetPrefixResolver()

getPrefixResolver

public org.apache.xml.utils.PrefixResolver getPrefixResolver()

NetKernel APIs


Copyright © 2002-2004 1060 Research Ltd. All Rights Reserved.