Package org.dom4j
Interface ElementPath
- 
public interface ElementPathThis interface is used byElementHandlerinstances to retrieve information about the current path hierarchy they are to process. It's primary use is to retrieve the currentElementbeing processed. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddHandler(String path, ElementHandler handler)Adds theElementHandlerto be called when the specified path is encounted.ElementgetCurrent()DOCUMENT ME!ElementgetElement(int depth)DOCUMENT ME!StringgetPath()DOCUMENT ME!voidremoveHandler(String path)Removes theElementHandlerfrom the event based processor, for the specified path.intsize()DOCUMENT ME! 
 - 
 
- 
- 
Method Detail
- 
size
int size()
DOCUMENT ME!- Returns:
 - the number of elements in the path
 
 
- 
getElement
Element getElement(int depth)
DOCUMENT ME!- Parameters:
 depth- DOCUMENT ME!- Returns:
 - the element at the specified depth index, 0 = root element
 
 
- 
getPath
String getPath()
DOCUMENT ME!- Returns:
 - the path as a string
 
 
- 
getCurrent
Element getCurrent()
DOCUMENT ME!- Returns:
 - the current element
 
 
- 
addHandler
void addHandler(String path, ElementHandler handler)
Adds theElementHandlerto be called when the specified path is encounted. The path can be either an absolute path (i.e. prefixed with "/") or a relative path (i.e. assummed to be a child of the current path as retrieved by getPath .- Parameters:
 path- is the path to be handledhandler- is theElementHandlerto be called by the event based processor.
 
- 
removeHandler
void removeHandler(String path)
Removes theElementHandlerfrom the event based processor, for the specified path. The path can be either an absolute path (i.e. prefixed with "/") or a relative path (i.e. assummed to be a child of the current path as retrieved by getPath .- Parameters:
 path- is the path to remove theElementHandlerfor.
 
 - 
 
 -