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
-
locationStack
-
-
returnAsAttribute
-
-
LocationFilter()
- zero-argument constructor
-
LocationFilter(Parser)
- one-argument constructor
-
endElement(String)
-
-
getLocation()
- The getLocation() method returns the Stack currently in use, identifying the location of the current
element.
-
getLocationAsXPtr()
- The getLocationAsXPtr() method returns the location of the current element as an XPointer, suitable for use
in XLink applications, such as XLinkFilter.
-
setReturnAttribute(boolean)
- The setReturnAttribute tells the LocationFilter whether to include Location info as an attribute.
-
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.
-
toString()
-
locationStack
protected Stack locationStack
returnAsAttribute
protected boolean returnAsAttribute
LocationFilter
public LocationFilter() throws IllegalAccessException, InstantiationException, ClassNotFoundException
- zero-argument constructor
LocationFilter
public LocationFilter(Parser parser)
- one-argument constructor
- Parameters:
- parser - - the SAX parser to be used underneath the filter.
setReturnAttribute
public void setReturnAttribute(boolean returnAttribute)
- The setReturnAttribute tells the LocationFilter whether to include Location info as an attribute.
This is not currently implemented.
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.
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.
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
endElement
public void endElement(String element) throws SAXException
- Overrides:
- endElement in class ParserFilter
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index