java.lang.Objectorg.xml.sax.helpers.XMLFilterImpl
sax.XMLFilterBase
All Implemented Interfaces:
LexicalHandler, ErrorHandler, EntityResolver, XMLFilter, ContentHandler, DTDHandler
Direct Known Subclasses:
XMLWriter, DataUnformatFilter, DataFormatFilter
The convenience methods are provided so that clients do not have to create empty attribute lists or provide empty strings as parameters; for example, the method invocation
w.startElement("foo");
is equivalent to the regular SAX2 ContentHandler method
w.startElement("", "foo", "", new AttributesImpl());
Except that it is more efficient because it does not allocate a new empty attribute list each time.
In fact, there is an even simpler convenience method, dataElement, designed for writing elements that contain only character data.
w.dataElement("greeting", "Hello, world!");
is equivalent to
w.startElement("greeting");
w.characters("Hello, world!");
w.endElement("greeting");
| Field Summary | ||
|---|---|---|
| protected static final Attributes | EMPTY_ATTS | |
| protected static final String[] | LEXICAL_HANDLER_NAMES | |
| Constructor: |
|---|
This filter will have no parent: you must assign a parent before you start a parse or do any configuration with setFeature or setProperty.
|
Use the XMLReader provided as the source of events.
|
| Method from sax.XMLFilterBase Summary: |
|---|
| characters, comment, dataElement, dataElement, dataElement, dataElement, emptyElement, emptyElement, emptyElement, emptyElement, endCDATA, endDTD, endElement, endElement, endEntity, getLexicalHandler, getProperty, parse, setLexicalHandler, setProperty, startCDATA, startDTD, startElement, startElement, startElement, startEntity |
| Methods from org.xml.sax.helpers.XMLFilterImpl: |
|---|
| characters, endDocument, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDTDHandler, setDocumentLocator, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning |
| Methods from java.lang.Object: |
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from sax.XMLFilterBase Detail: |
|---|
This is a convenience method that takes an XML String, converts it to a character array, then invokes org.xml.sax.ContentHandler#characters . |
|
This is a convenience method to add a complete element with character data content, including the start tag and end tag. The method provides an empty string for the Namespace URI, and empty string for the qualified name, and an empty attribute list. It invokes #dataElement(String, String, String, Attributes, String) } directly. |
This is a convenience method to add a complete element with character data content, including the start tag and end tag. This method provides an empty string for the qname and an empty attribute list. It invokes #dataElement(String, String, String, Attributes, String) } directly. |
This is a convenience method to add a complete element with character data content, including the start tag and end tag. The method provides an empty string for the Namespace URI, and empty string for the qualified name. It invokes #dataElement(String, String, String, Attributes, String) } directly. |
This is a convenience method to add a complete element with character data content, including the start tag and end tag. This method invokes org.xml.sax.ContentHandler#startElement , followed by #characters(String) , followed by org.xml.sax.ContentHandler#endElement . |
This method will supply an empty string for the qname, and empty string for the Namespace URI, and an empty attribute list. It invokes #emptyElement(String, String, String, Attributes) directly. |
This method will supply an empty string for the qname and an empty attribute list. It invokes #emptyElement(String, String, String, Attributes) directly. |
This method will provide an empty string for the Namespace URI, and empty string for the qualified name. It invokes #emptyElement(String, String, String, Attributes) directly. |
|
|
|
This method will supply an empty string for the qName and an empty string for the Namespace URI. It invokes #endElement(String, String, String) directly. |
This method will supply an empty string for the qName. It invokes #endElement(String, String, String) directly. |
|
|
|
|
|
This will always fail if the parent is null. |
|
|
This method will provide an empty string for the Namespace URI, and empty string for the qualified name, and a default empty attribute list. It invokes #startElement(String, String, String, Attributes) directly. |
This method will provide a default empty attribute list and an empty string for the qualified name. It invokes #startElement(String, String, String, Attributes) directly. |
This method will provide an empty string for the Namespace URI, and empty string for the qualified name. It invokes #startElement(String, String, String, Attributes) directly. |
|