Save This Page
Home » Xerces-J-src.2.9.1 » sax » [javadoc | source]
sax
abstract public class: XMLReaderBase [javadoc | source]
java.lang.Object
   org.xml.sax.helpers.DefaultHandler
      sax.XMLReaderBase

All Implemented Interfaces:
    XMLReader, LexicalHandler, ErrorHandler, EntityResolver, ContentHandler, DTDHandler

Direct Known Subclasses:
    DocumentReader

Base class for implementing an XML reader. Adapted from David Megginson's XMLFilterImpl and XMLFilterBase.
Field Summary
protected static final  Attributes EMPTY_ATTS     
protected static final  String[] LEXICAL_HANDLER_NAMES     
Constructor:
 public XMLReaderBase() 
Method from sax.XMLReaderBase Summary:
characters,   characters,   comment,   dataElement,   dataElement,   dataElement,   dataElement,   emptyElement,   emptyElement,   emptyElement,   emptyElement,   endCDATA,   endDTD,   endDocument,   endElement,   endElement,   endElement,   endEntity,   endPrefixMapping,   error,   fatalError,   getContentHandler,   getDTDHandler,   getEntityResolver,   getErrorHandler,   getFeature,   getLexicalHandler,   getProperty,   ignorableWhitespace,   notationDecl,   parse,   parse,   processingInstruction,   resolveEntity,   setContentHandler,   setDTDHandler,   setDocumentLocator,   setEntityResolver,   setErrorHandler,   setFeature,   setLexicalHandler,   setProperty,   skippedEntity,   startCDATA,   startDTD,   startDocument,   startElement,   startElement,   startElement,   startElement,   startEntity,   startPrefixMapping,   unparsedEntityDecl,   warning
Methods from org.xml.sax.helpers.DefaultHandler:
characters,   endDocument,   endElement,   endPrefixMapping,   error,   fatalError,   ignorableWhitespace,   notationDecl,   processingInstruction,   resolveEntity,   setDocumentLocator,   skippedEntity,   startDocument,   startElement,   startPrefixMapping,   unparsedEntityDecl,   warning
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sax.XMLReaderBase Detail:
 public  void characters(String data) throws SAXException 
    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 org.xml.sax.ContentHandler#characters .

 public  void characters(char[] ch,
    int start,
    int length) throws SAXException 
    Sends character data.
 public  void comment(char[] ch,
    int start,
    int length) throws SAXException 
 public  void dataElement(String localName,
    String content) throws SAXException 
    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. 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.

 public  void dataElement(String uri,
    String localName,
    String content) throws SAXException 
    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. This method provides an empty string for the qname and an empty attribute list. It invokes #dataElement(String, String, String, Attributes, String) } directly.

 public  void dataElement(String localName,
    Attributes atts,
    String content) throws SAXException 
    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. 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.

 public  void dataElement(String uri,
    String localName,
    String qName,
    Attributes atts,
    String content) throws SAXException 
 public  void emptyElement(String localName) throws SAXException 
    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. It invokes #emptyElement(String, String, String, Attributes) directly.

 public  void emptyElement(String uri,
    String localName) throws SAXException 
 public  void emptyElement(String localName,
    Attributes atts) throws SAXException 
 public  void emptyElement(String uri,
    String localName,
    String qName,
    Attributes atts) throws SAXException 
 public  void endCDATA() throws SAXException 
 public  void endDTD() throws SAXException 
    Sends end of DTD.
 public  void endDocument() throws SAXException 
    Send end of document.
 public  void endElement(String localName) throws SAXException 
    End an element without a Namespace URI or qname.

    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.

 public  void endElement(String uri,
    String localName) throws SAXException 
 public  void endElement(String uri,
    String localName,
    String qName) throws SAXException 
    Sends end of element.
 public  void endEntity(String name) throws SAXException 
 public  void endPrefixMapping(String prefix) throws SAXException 
    Sends end of namespace prefix mapping.
 public  void error(SAXParseException e) throws SAXException 
    Sends error.
 public  void fatalError(SAXParseException e) throws SAXException 
    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) throws SAXNotSupportedException, SAXNotRecognizedException 
    Look up the state of a feature.

    This will always fail.

 public LexicalHandler getLexicalHandler() 
    Get the current lexical handler.
 public Object getProperty(String name) throws SAXNotSupportedException, SAXNotRecognizedException 
    Look up the value of a property.

    Only lexical-handler properties are recognized.

 public  void ignorableWhitespace(char[] ch,
    int start,
    int length) throws SAXException 
    Sends ignorable whitespace.
 public  void notationDecl(String name,
    String publicId,
    String systemId) throws SAXException 
    Add notation declaration.
 abstract public  void parse(InputSource input) throws IOException, SAXException
    Parse a document. Subclass must implement.
 public  void parse(String systemId) throws IOException, SAXException 
    Parse a document.
 public  void processingInstruction(String target,
    String data) throws SAXException 
    Sends processing instruction.
 public InputSource resolveEntity(String publicId,
    String systemId) throws SAXException 
    Resolves an external entity.
 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) throws SAXNotSupportedException, SAXNotRecognizedException 
    Set the state of a feature.

    This will always fail.

 public  void setLexicalHandler(LexicalHandler handler) 
    Set the lexical handler.
 public  void setProperty(String name,
    Object value) throws SAXNotSupportedException, SAXNotRecognizedException 
    Set the value of a property.

    Only lexical-handler properties are recognized.

 public  void skippedEntity(String name) throws SAXException 
    Sends skipped entity.
 public  void startCDATA() throws SAXException 
 public  void startDTD(String name,
    String publicId,
    String systemId) throws SAXException 
    Sends start of DTD.
 public  void startDocument() throws SAXException 
    Send start of document.
 public  void startElement(String localName) throws SAXException 
    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. It invokes #startElement(String, String, String, Attributes) directly.

 public  void startElement(String uri,
    String localName) throws SAXException 
 public  void startElement(String localName,
    Attributes atts) throws SAXException 
 public  void startElement(String uri,
    String localName,
    String qName,
    Attributes atts) throws SAXException 
    Sends start of element.
 public  void startEntity(String name) throws SAXException 
 public  void startPrefixMapping(String prefix,
    String uri) throws SAXException 
    Sends start of namespace prefix mapping.
 public  void unparsedEntityDecl(String name,
    String publicId,
    String systemId,
    String notationName) throws SAXException 
    Add unparsed entity declaration.
 public  void warning(SAXParseException e) throws SAXException 
    Sends warning.