All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.simonstl.sax.location.LocationFilter

java.lang.Object
   |
   +----org.ccil.cowan.sax.ParserFilter
           |
           +----com.simonstl.sax.location.LocationFilter

public class LocationFilter
extends ParserFilter

Variable Index

 o locationStack
 o returnAsAttribute

Constructor Index

 o LocationFilter()
zero-argument constructor
 o LocationFilter(Parser)
one-argument constructor

Method Index

 o endElement(String)
 o getLocation()
The getLocation() method returns the Stack currently in use, identifying the location of the current element.
 o getLocationAsXPtr()
The getLocationAsXPtr() method returns the location of the current element as an XPointer, suitable for use in XLink applications, such as XLinkFilter.
 o setReturnAttribute(boolean)
The setReturnAttribute tells the LocationFilter whether to include Location info as an attribute.
 o startElement(String, AttributeList)
The startElement method provides most of the functionality of Location Filter, building a stack to keep track of where in the hierarchy the current element is.
 o toString()

Variables

 o locationStack
 protected Stack locationStack
 o returnAsAttribute
 protected boolean returnAsAttribute

Constructors

 o LocationFilter
 public LocationFilter() throws IllegalAccessException, InstantiationException, ClassNotFoundException
zero-argument constructor

 o LocationFilter
 public LocationFilter(Parser parser)
one-argument constructor

Parameters:
parser - - the SAX parser to be used underneath the filter.

Methods

 o setReturnAttribute
 public void setReturnAttribute(boolean returnAttribute)
The setReturnAttribute tells the LocationFilter whether to include Location info as an attribute. This is not currently implemented.

 o getLocation
 public Stack getLocation()
The getLocation() method returns the Stack currently in use, identifying the location of the current element. This direct access provides applications with a ready means of addressing this element through a DOM tree. For the most part, getLocationAsXPtr is more useful with XLinkFilter, but I left this access here so that people who need to identify element locations for other purposes can do so.

 o getLocationAsXPtr
 public String getLocationAsXPtr()
The getLocationAsXPtr() method returns the location of the current element as an XPointer, suitable for use in XLink applications, such as XLinkFilter.

 o startElement
 public void startElement(String element,
                          AttributeList atts) throws SAXException
The startElement method provides most of the functionality of Location Filter, building a stack to keep track of where in the hierarchy the current element is.

Overrides:
startElement in class ParserFilter
 o endElement
 public void endElement(String element) throws SAXException
Overrides:
endElement in class ParserFilter
 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index