com.raritantechnologies.xml.sax.filter.xPath
Class XPathElement

java.lang.Object
  extended bycom.raritantechnologies.xml.sax.filter.xPath.XPathElement

public class XPathElement
extends java.lang.Object

SAX implementation of XPath: does not support last( ) expression. Uses [@attName=attrValue] format for attributes.


Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Constructor Summary
XPathElement(java.lang.String xPathExpression)
           
 
Method Summary
static boolean childInPath(java.lang.String name, java.lang.String path)
           
static java.lang.String elementName(java.lang.String elementPath)
           
static java.lang.String elementPredicate(java.lang.String elementPath)
           
static java.lang.String getChildPath(java.lang.String path)
           
static java.lang.String getDescendentPath(java.lang.String name, java.lang.String path)
           
static java.lang.String[] getElementPredicates(java.lang.String elementPath)
           
static java.lang.String getFirstElement(java.lang.String path)
           
static boolean isDescendent(java.lang.String path)
           
 boolean matches(java.lang.String path, org.xml.sax.Attributes attr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathElement

public XPathElement(java.lang.String xPathExpression)
Method Detail

matches

public boolean matches(java.lang.String path,
                       org.xml.sax.Attributes attr)

getFirstElement

public static java.lang.String getFirstElement(java.lang.String path)

elementName

public static java.lang.String elementName(java.lang.String elementPath)

elementPredicate

public static java.lang.String elementPredicate(java.lang.String elementPath)

getElementPredicates

public static java.lang.String[] getElementPredicates(java.lang.String elementPath)

isDescendent

public static boolean isDescendent(java.lang.String path)

getChildPath

public static java.lang.String getChildPath(java.lang.String path)

childInPath

public static boolean childInPath(java.lang.String name,
                                  java.lang.String path)

getDescendentPath

public static java.lang.String getDescendentPath(java.lang.String name,
                                                 java.lang.String path)