NetKernel APIs


com.ten60.netkernel.util
Class FastXPath

java.lang.Object
  extended bycom.ten60.netkernel.util.FastXPath

public class FastXPath
extends Object

A Fast implementation XPath for simple expressions. Evaluation shows it is an order of magnitude faster than xalan and will work for about 2/3 of expressions in normal usage.
It will evaluate xpaths of the forms:


Constructor Summary
FastXPath()
           
 
Method Summary
static List eval(Node aContextNode, String aXPath)
          Returns a nodeset of matching nodes for the evaluation of the xpath at the given context node
static Node getSingleNode(Node aContextNode, String aXPath)
           
static boolean isSuitable(String aXPath)
          Returns true if it is possible to evaluate the xpath using this engine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastXPath

public FastXPath()
Method Detail

eval

public static List eval(Node aContextNode,
                        String aXPath)
                 throws TransformerException
Returns a nodeset of matching nodes for the evaluation of the xpath at the given context node

Throws:
TransformerException

getSingleNode

public static Node getSingleNode(Node aContextNode,
                                 String aXPath)
                          throws TransformerException
Throws:
TransformerException

isSuitable

public static boolean isSuitable(String aXPath)
Returns true if it is possible to evaluate the xpath using this engine


NetKernel APIs


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