public class SAXFilter extends Object implements ContentHandler, LexicalHandler
| Constructor and Description |
|---|
SAXFilter(ContentHandler contentHandler,
LexicalHandler lexicalHandler,
NamespaceSupport namespaces)
Construct a new SAXFilter such that the allowed events will be routed
to the corresponding content and lexical handlers.
|
| Modifier and Type | Method and Description |
|---|---|
SAXFilter |
allowCDATA()
Allow CDATA events
|
SAXFilter |
allowCharacters()
Allow character events
|
SAXFilter |
allowComments()
Allow comment events
|
SAXFilter |
allowDocumentLocators()
Allow document locator events
|
SAXFilter |
allowDocuments()
Allow start/end document events
|
SAXFilter |
allowDTDs()
Allow DTD events
|
SAXFilter |
allowElements()
allow start/end element events
|
SAXFilter |
allowElements(int minimumElementLevel)
Allow start/end element events.
|
SAXFilter |
allowEntities()
Allow XML entities events
|
SAXFilter |
allowIgnorableWhitespace()
Allow ignorable whitespace events
|
SAXFilter |
allowPrefixMappings()
allow start/end prefix mapping events
|
SAXFilter |
allowProcessingInstructions()
Allow processing instruction events
|
SAXFilter |
allowSkippedEntities()
Allow start / end events for skipped entities
|
void |
characters(char[] ch,
int start,
int length) |
void |
comment(char[] ch,
int start,
int length) |
void |
endCDATA() |
void |
endDocument() |
void |
endDTD() |
void |
endElement(String uri,
String localName,
String qName) |
void |
endEntity(String name) |
void |
endPrefixMapping(String prefix) |
void |
ignorableWhitespace(char[] ch,
int start,
int length) |
void |
processingInstruction(String target,
String data) |
SAXFilter |
setDefaultNamespace(String uri)
Add a default namespace is none is provided.
|
void |
setDocumentLocator(Locator locator) |
void |
skippedEntity(String name) |
void |
startCDATA() |
void |
startDocument()
SAX Content events
|
void |
startDTD(String name,
String publicId,
String systemId)
SAX Lexical events
|
void |
startElement(String uri,
String localName,
String qName,
Attributes atts) |
void |
startEntity(String name) |
void |
startPrefixMapping(String prefix,
String uri) |
public SAXFilter(ContentHandler contentHandler, LexicalHandler lexicalHandler, NamespaceSupport namespaces)
contentHandler - The SAX content handler.lexicalHandler - The SAX lexical handler.namespaces - Namespace support which records what prefixes have been defined.public SAXFilter allowDocuments()
public SAXFilter allowDocumentLocators()
public SAXFilter allowProcessingInstructions()
public SAXFilter allowPrefixMappings()
public SAXFilter allowElements()
public SAXFilter allowElements(int minimumElementLevel)
minimumElementLevel - the minimum level required.public SAXFilter allowIgnorableWhitespace()
public SAXFilter allowSkippedEntities()
public SAXFilter allowCharacters()
public SAXFilter allowDTDs()
public SAXFilter allowEntities()
public SAXFilter allowCDATA()
public SAXFilter allowComments()
public SAXFilter setDefaultNamespace(String uri)
uri - the default namespace uri.public void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXExceptionpublic void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXExceptionpublic void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandlerpublic void processingInstruction(String target, String data) throws SAXException
processingInstruction in interface ContentHandlerSAXExceptionpublic void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping in interface ContentHandlerSAXExceptionpublic void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping in interface ContentHandlerSAXExceptionpublic void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
startElement in interface ContentHandlerSAXExceptionpublic void endElement(String uri, String localName, String qName) throws SAXException
endElement in interface ContentHandlerSAXExceptionpublic void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerSAXExceptionpublic void skippedEntity(String name) throws SAXException
skippedEntity in interface ContentHandlerSAXExceptionpublic void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlerSAXExceptionpublic void startDTD(String name, String publicId, String systemId) throws SAXException
startDTD in interface LexicalHandlerSAXExceptionpublic void endDTD()
throws SAXException
endDTD in interface LexicalHandlerSAXExceptionpublic void startEntity(String name) throws SAXException
startEntity in interface LexicalHandlerSAXExceptionpublic void endEntity(String name) throws SAXException
endEntity in interface LexicalHandlerSAXExceptionpublic void startCDATA()
throws SAXException
startCDATA in interface LexicalHandlerSAXExceptionpublic void endCDATA()
throws SAXException
endCDATA in interface LexicalHandlerSAXExceptionpublic void comment(char[] ch,
int start,
int length)
throws SAXException
comment in interface LexicalHandlerSAXExceptionCopyright © 2015 DuraSpace. All Rights Reserved.