|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectXPathTracker
public class XPathTracker
This class is used to keep track of the position in an XML document e.g. during SAX Parsing. Internal representation format is a (very small) subset of XPath. Main advantage over a full-fledged implementation of XPath is high performance.
Constructor Summary | |
---|---|
XPathTracker()
builds a new XPath tracker, starting with an empty path |
Method Summary | |
---|---|
boolean |
atPath(java.lang.String thePath)
check whether the XPathTracker is at a path the path to check for can consist of a disjunction (by the | symbol) of XPaths and each of the XPaths can contain one occurrence of ".." designating an arbitrary number of intermediary levels |
void |
goToAttribute(java.lang.String dir)
move position along the attribute axis |
void |
goToElement(java.lang.String dir)
move position to a subelement |
void |
levelUp()
move position up one level |
java.lang.String |
toString()
get info about the present position (for debugging purposes) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XPathTracker()
Method Detail |
---|
public void goToAttribute(java.lang.String dir)
dir
- - the name of the attributepublic void goToElement(java.lang.String dir)
dir
- - the name of the elementpublic void levelUp()
public boolean atPath(java.lang.String thePath)
thePath
- - the path we want to check for
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |