Class SPathFilter
java.lang.Object
org.xml.sax.helpers.XMLFilterImpl
org.apache.taglibs.standard.extra.spath.SPathFilter
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler,XMLFilter,XMLReader
Filters a SAX stream based on a single supplied SPath expression.
- Author:
- Shawn Bayern
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) Filter for characters().voidendElement(String uri, String localName, String qName) Filter for endElement().voidendPrefixMapping(String prefix) Filter for endPrefixMapping().voidignorableWhitespace(char[] ch, int start, int length) Filter for ignoreableWhitespace().static booleannodeMatchesStep(Step s, String uri, String localName, String qName, Attributes a) voidprocessingInstruction(String target, String data) Filter for processingInstruction().voidskippedEntity(String name) Filter for skippedEntity().voidResets state.voidstartElement(String uri, String localName, String qName, Attributes a) Filter for startElement().voidstartPrefixMapping(String prefix, String uri) Filter for startPrefixMapping().Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
endDocument, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, notationDecl, parse, parse, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
steps
The steps in the SPath expression we use for filtering.
-
-
Constructor Details
-
SPathFilter
Constructs a new SPathFilter, given a Path.
-
-
Method Details
-
startElement
public void startElement(String uri, String localName, String qName, Attributes a) throws SAXException Filter for startElement().- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classXMLFilterImpl- Throws:
SAXException
-
endElement
Filter for endElement().- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classXMLFilterImpl- Throws:
SAXException
-
ignorableWhitespace
Filter for ignoreableWhitespace().- Specified by:
ignorableWhitespacein interfaceContentHandler- Overrides:
ignorableWhitespacein classXMLFilterImpl- Throws:
SAXException
-
characters
Filter for characters().- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classXMLFilterImpl- Throws:
SAXException
-
startPrefixMapping
Filter for startPrefixMapping().- Specified by:
startPrefixMappingin interfaceContentHandler- Overrides:
startPrefixMappingin classXMLFilterImpl- Throws:
SAXException
-
endPrefixMapping
Filter for endPrefixMapping().- Specified by:
endPrefixMappingin interfaceContentHandler- Overrides:
endPrefixMappingin classXMLFilterImpl- Throws:
SAXException
-
processingInstruction
Filter for processingInstruction().- Specified by:
processingInstructionin interfaceContentHandler- Overrides:
processingInstructionin classXMLFilterImpl- Throws:
SAXException
-
skippedEntity
Filter for skippedEntity().- Specified by:
skippedEntityin interfaceContentHandler- Overrides:
skippedEntityin classXMLFilterImpl- Throws:
SAXException
-
startDocument
public void startDocument()Resets state.- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classXMLFilterImpl
-
nodeMatchesStep
public static boolean nodeMatchesStep(Step s, String uri, String localName, String qName, Attributes a)
-