public class GroupCharactersFilter extends SAXFilterHandler
characters(char[],int,int) into a single call with all of the
content concatenated. A flag may be supplied at construction time
that will cause all character content that is all whitespace, as
defined by Strings.allWhitespace(char[],int,int) to be
ignored.mHandlerCDATA_ATTS_TYPE, EMPTY_ATTS, NO_OP_DEFAULT_HANDLER| Constructor and Description |
|---|
GroupCharactersFilter(org.xml.sax.helpers.DefaultHandler handler)
Construct a character grouping filter that delegates events to
the specified handler.
|
GroupCharactersFilter(org.xml.sax.helpers.DefaultHandler handler,
boolean removeWhitespace)
Construct a character grouping filter without a specified
handler to which to delegate events.
|
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Adds the characters to the character accumulator.
|
void |
endDocument()
End the document, delegating the call to the contained
handler, after calling
characters(char[],int,int) on
any accumulated characters. |
void |
endElement(String namespaceURI,
String localName,
String qName)
Ends the specified element, delegating the SAX event to the
contained handler, after calling
characters(char[],int,int) to handle any accumulated
characters. |
void |
startDocument()
Start the document, delegating the call to the contained
handler.
|
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
Start the specified element, delegating the SAX event to the
contained handler, after calling
characters(char[],int,int) to handle any accumulated
characters. |
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, setHandler, skippedEntity, startPrefixMapping, unparsedEntityDecl, warningaddSimpleAttribute, characters, characters, characters, characters, createAttributes, createAttributes, createAttributes, createAttributes, createAttributes, createAttributes, endSimpleElement, endSimpleElement, startEndSimpleElement, startEndSimpleElement, startSimpleElement, startSimpleElement, startSimpleElement, startSimpleElement, startSimpleElement, startSimpleElement, startSimpleElementpublic GroupCharactersFilter(org.xml.sax.helpers.DefaultHandler handler)
SAXFilterHandler.setHandler(DefaultHandler).handler - Handler to which events are delegated.public GroupCharactersFilter(org.xml.sax.helpers.DefaultHandler handler, boolean removeWhitespace)
SAXFilterHandler.setHandler(DefaultHandler).public void startDocument()
throws SAXException
startDocument in interface ContentHandlerstartDocument in class SAXFilterHandlerSAXException - If there is an exception raised by the
contained handler.public void endDocument()
throws SAXException
characters(char[],int,int) on
any accumulated characters.endDocument in interface ContentHandlerendDocument in class SAXFilterHandlerSAXException - If there is an exception raised by the
contained handler.public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
characters(char[],int,int) to handle any accumulated
characters.startElement in interface ContentHandlerstartElement in class SAXFilterHandlernamespaceURI - The URI of the namespace for this element.localName - The local name (without prefix) for this
element.qName - The qualified name (with prefix, if any) for this
element.atts - The attributes for this element.SAXException - If there is an exception raised by the
contained handler.public void endElement(String namespaceURI, String localName, String qName) throws SAXException
characters(char[],int,int) to handle any accumulated
characters.endElement in interface ContentHandlerendElement in class SAXFilterHandlernamespaceURI - The URI of the namespace for this element.localName - The local name (without prefix) for this
element.qName - The qualified name (with prefix, if any) for this
element.SAXException - If there is an exception raised by the
contained handler.public final void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlercharacters in class SAXFilterHandlerch - Array of characters to add to accumulator.start - First character to accumulate.length - Number of characters to accumulate.SAXException - if the contained hanlder throws a SAX
exception.Copyright © 2019 Alias-i, Inc.. All rights reserved.