| java.lang.Object org.xml.sax.helpers.DefaultHandler sax.XMLReaderBase
All known Subclasses: sax.DocumentReader,
XMLReaderBase | abstract public class XMLReaderBase extends DefaultHandler implements LexicalHandler,XMLReader(Code) | | Base class for implementing an XML reader.
Adapted from David Megginson's XMLFilterImpl and XMLFilterBase.
|
Constructor Summary | |
public | XMLReaderBase() Creates new XMLReaderBase. |
Method Summary | |
public void | characters(String data) Add a string of character data, with XML escaping. | public void | characters(char ch, int start, int length) Sends character data. | public void | comment(char[] ch, int start, int length) | public void | dataElement(String uri, String localName, String qName, Attributes atts, String content) Add an element with character data content. | public void | dataElement(String uri, String localName, String content) Add an element with character data content but no qname or attributes.
This is a convenience method to add a complete element
with character data content, including the start tag
and end tag. | public void | dataElement(String localName, Attributes atts, String content) Add an element with character data content but no Namespace URI or qname.
This is a convenience method to add a complete element
with character data content, including the start tag
and end tag. | public void | dataElement(String localName, String content) Add an element with character data content but no attributes
or Namespace URI.
This is a convenience method to add a complete element
with character data content, including the start tag
and end tag. | public void | emptyElement(String uri, String localName, String qName, Attributes atts) Add an empty element.
Both a
XMLReaderBase.startElement startElement and an
XMLReaderBase.endElement endElement event will be passed on down
the filter chain.
Parameters: uri - The element's Namespace URI, or the empty stringif the element has no Namespace or if Namespaceprocessing is not being performed. Parameters: localName - The element's local name (without prefix). | public void | emptyElement(String uri, String localName) Add an empty element without a qname or attributes.
This method will supply an empty string for the qname
and an empty attribute list. | public void | emptyElement(String localName, Attributes atts) Add an empty element without a Namespace URI or qname. | public void | emptyElement(String localName) Add an empty element without a Namespace URI, qname or attributes.
This method will supply an empty string for the qname,
and empty string for the Namespace URI, and an empty
attribute list. | public void | endCDATA() | public void | endDTD() Sends end of DTD. | public void | endDocument() Send end of document. | public void | endElement(String uri, String localName) End an element without a qname. | public void | endElement(String localName) End an element without a Namespace URI or qname. | public void | endElement(String uri, String localName, String qName) Sends end of element. | public void | endEntity(String name) | public void | endPrefixMapping(String prefix) Sends end of namespace prefix mapping. | public void | error(SAXParseException e) Sends error. | public void | fatalError(SAXParseException e) Sends fatal error. | public ContentHandler | getContentHandler() Get the content event handler. | public DTDHandler | getDTDHandler() Get the current DTD event handler. | public EntityResolver | getEntityResolver() Get the current entity resolver. | public ErrorHandler | getErrorHandler() Get the current error event handler. | public boolean | getFeature(String name) Look up the state of a feature.
This will always fail.
Parameters: name - The feature name. | public LexicalHandler | getLexicalHandler() Get the current lexical handler. | public Object | getProperty(String name) Look up the value of a property.
Only lexical-handler properties are recognized.
Parameters: name - The property name. | public void | ignorableWhitespace(char ch, int start, int length) Sends ignorable whitespace. | public void | notationDecl(String name, String publicId, String systemId) Add notation declaration. | abstract public void | parse(InputSource input) Parse a document. | public void | parse(String systemId) Parse a document. | public void | processingInstruction(String target, String data) Sends processing instruction. | public InputSource | resolveEntity(String publicId, String systemId) Resolves an external entity.
Parameters: publicId - The entity's public identifier, or null. Parameters: systemId - The entity's system identifier. | public void | setContentHandler(ContentHandler handler) Set the content event handler. | public void | setDTDHandler(DTDHandler handler) Set the DTD event handler. | public void | setDocumentLocator(Locator locator) Assigns the document locator. | public void | setEntityResolver(EntityResolver resolver) Set the entity resolver. | public void | setErrorHandler(ErrorHandler handler) Set the error event handler. | public void | setFeature(String name, boolean state) Set the state of a feature. | public void | setLexicalHandler(LexicalHandler handler) Set the lexical handler. | public void | setProperty(String name, Object value) Set the value of a property. | public void | skippedEntity(String name) Sends skipped entity. | public void | startCDATA() | public void | startDTD(String name, String publicId, String systemId) Sends start of DTD. | public void | startDocument() Send start of document. | public void | startElement(String uri, String localName) Start a new element without a qname or attributes.
This method will provide a default empty attribute
list and an empty string for the qualified name. | public void | startElement(String localName, Attributes atts) Start a new element without a Namespace URI or qname. | public void | startElement(String localName) Start a new element without a Namespace URI, qname, or attributes.
This method will provide an empty string for the
Namespace URI, and empty string for the qualified name,
and a default empty attribute list. | public void | startElement(String uri, String localName, String qName, Attributes atts) Sends start of element. | public void | startEntity(String name) | public void | startPrefixMapping(String prefix, String uri) Sends start of namespace prefix mapping. | public void | unparsedEntityDecl(String name, String publicId, String systemId, String notationName) Add unparsed entity declaration. | public void | warning(SAXParseException e) Sends warning. |
LEXICAL_HANDLER_NAMES | final protected static String[] LEXICAL_HANDLER_NAMES(Code) | | |
XMLReaderBase | public XMLReaderBase()(Code) | | Creates new XMLReaderBase.
|
characters | public void characters(String data) throws SAXException(Code) | | Add a string of character data, with XML escaping.
This is a convenience method that takes an XML
String, converts it to a character array, then invokes
@see org.xml.sax.ContentHandler#characters .
Parameters: data - The character data. exception: org.xml.sax.SAXException - If a filterfurther down the chain raises an exception. See Also: @see org.xml.sax.ContentHandler#characters |
characters | public void characters(char ch, int start, int length) throws SAXException(Code) | | Sends character data.
Parameters: ch - An array of characters. Parameters: start - The starting position in the array. Parameters: length - The number of characters to use from the array. exception: org.xml.sax.SAXException - The client may throwan exception during processing. See Also: org.xml.sax.ContentHandler.characters |
getLexicalHandler | public LexicalHandler getLexicalHandler()(Code) | | Get the current lexical handler.
The current lexical handler, or null if none was set. |
ignorableWhitespace | public void ignorableWhitespace(char ch, int start, int length) throws SAXException(Code) | | Sends ignorable whitespace.
Parameters: ch - An array of characters. Parameters: start - The starting position in the array. Parameters: length - The number of characters to use from the array. exception: org.xml.sax.SAXException - The client may throwan exception during processing. See Also: org.xml.sax.ContentHandler.ignorableWhitespace |
startDTD | public void startDTD(String name, String publicId, String systemId) throws SAXException(Code) | | Sends start of DTD.
Parameters: name - The document type name. Parameters: publicId - The declared public identifier for theexternal DTD subset, or null if none was declared. Parameters: systemId - The declared system identifier for theexternal DTD subset, or null if none was declared. exception: org.xml.sax.SAXException - If a filterfurther down the chain raises an exception. See Also: org.xml.sax.ext.LexicalHandler.startDTD |
startElement | public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException(Code) | | Sends start of element.
Parameters: uri - The element's Namespace URI, or the empty string. Parameters: localName - The element's local name, or the empty string. Parameters: qName - The element's qualified (prefixed) name, or the emptystring. Parameters: atts - The element's attributes. exception: org.xml.sax.SAXException - The client may throwan exception during processing. See Also: org.xml.sax.ContentHandler.startElement |
unparsedEntityDecl | public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException(Code) | | Add unparsed entity declaration.
Parameters: name - The entity name. Parameters: publicId - The entity's public identifier, or null. Parameters: systemId - The entity's system identifier, or null. Parameters: notationName - The name of the associated notation. exception: org.xml.sax.SAXException - The client may throwan exception during processing. See Also: org.xml.sax.DTDHandler.unparsedEntityDecl |
Methods inherited from org.xml.sax.helpers.DefaultHandler | public void characters(char ch, int start, int length) throws SAXException(Code)(Java Doc) public void endDocument() throws SAXException(Code)(Java Doc) public void endElement(String uri, String localName, String qName) throws SAXException(Code)(Java Doc) public void endPrefixMapping(String prefix) throws SAXException(Code)(Java Doc) public void error(SAXParseException e) throws SAXException(Code)(Java Doc) public void fatalError(SAXParseException e) throws SAXException(Code)(Java Doc) public void ignorableWhitespace(char ch, int start, int length) throws SAXException(Code)(Java Doc) public void notationDecl(String name, String publicId, String systemId) throws SAXException(Code)(Java Doc) public void processingInstruction(String target, String data) throws SAXException(Code)(Java Doc) public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException(Code)(Java Doc) public void setDocumentLocator(Locator locator)(Code)(Java Doc) public void skippedEntity(String name) throws SAXException(Code)(Java Doc) public void startDocument() throws SAXException(Code)(Java Doc) public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException(Code)(Java Doc) public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)(Java Doc) public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException(Code)(Java Doc) public void warning(SAXParseException e) throws SAXException(Code)(Java Doc)
|
|
|