org.wikimodel.wem.xhtml.filter
Class AccumulationXMLFilter
java.lang.Object
org.xml.sax.helpers.XMLFilterImpl
org.wikimodel.wem.xhtml.filter.DefaultXMLFilter
org.wikimodel.wem.xhtml.filter.AccumulationXMLFilter
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler, LexicalHandler, XMLFilter, XMLReader
public class AccumulationXMLFilter
- extends DefaultXMLFilter
SAX parsers are allowed to call the characters() method several times in a
row. Some parsers have a buffer of 8K (Crimson), others of 16K (Xerces) and
others can even call onCharacters() for every single characters! Thus we need
to accumulate the characters in a buffer before we process them. This filter
does exactly this.
- Author:
- vmassol
| Methods inherited from class org.xml.sax.helpers.XMLFilterImpl |
endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, ignorableWhitespace, notationDecl, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AccumulationXMLFilter
public AccumulationXMLFilter()
AccumulationXMLFilter
public AccumulationXMLFilter(XMLReader reader)
characters
public void characters(char[] array,
int start,
int length)
throws SAXException
- Specified by:
characters in interface ContentHandler- Overrides:
characters in class XMLFilterImpl
- Throws:
SAXException- See Also:
DefaultHandler.characters(char[], int, int)
startElement
public void startElement(String uri,
String localName,
String qName,
Attributes attributes)
throws SAXException
- Specified by:
startElement in interface ContentHandler- Overrides:
startElement in class XMLFilterImpl
- Throws:
SAXException- See Also:
DefaultHandler.startElement(java.lang.String,
java.lang.String, java.lang.String, org.xml.sax.Attributes)
endElement
public void endElement(String uri,
String localName,
String qName)
throws SAXException
- Specified by:
endElement in interface ContentHandler- Overrides:
endElement in class XMLFilterImpl
- Throws:
SAXException- See Also:
DefaultHandler.endElement(java.lang.String,
java.lang.String, java.lang.String)
comment
public void comment(char[] array,
int start,
int length)
throws SAXException
- Specified by:
comment in interface LexicalHandler- Overrides:
comment in class DefaultXMLFilter
- Throws:
SAXException
startCDATA
public void startCDATA()
throws SAXException
- Specified by:
startCDATA in interface LexicalHandler- Overrides:
startCDATA in class DefaultXMLFilter
- Throws:
SAXException
endCDATA
public void endCDATA()
throws SAXException
- Specified by:
endCDATA in interface LexicalHandler- Overrides:
endCDATA in class DefaultXMLFilter
- Throws:
SAXException
Copyright © 2005-2010. All Rights Reserved.