Name

The XMLReader Interface

Synopsis

The XMLReader interface represents the parser that reads XML documents. You generally do not implement this interface yourself. Instead, use the org.xml.sax.helpers.XMLReaderFactory class to build a parser-specific implementation. Then use this parser's various setter methods to configure the parsing process. Finally, invoke the parse( ) method to read the document, while calling back to methods in your own implementations of ContentHandler, ErrorHandler, EntityResolver, and DTDHandler as the document is read:

package org.xml.sax;
     
public interface XMLReader {
     
  public boolean getFeature(String name)
   throws SAXNotRecognizedException, SAXNotSupportedException;
  public void    setFeature(String name, boolean value)
   throws SAXNotRecognizedException, SAXNotSupportedException;
  public Object  getProperty(String name)
   throws SAXNotRecognizedException, SAXNotSupportedException;
     
  public void    setProperty(String name, Object value)
   throws SAXNotRecognizedException, SAXNotSupportedException;
  public void           setEntityResolver(EntityResolver resolver);
  public EntityResolver getEntityResolver(  );
  public void           setDTDHandler(DTDHandler handler);
  public DTDHandler     getDTDHandler(  );
  public void           setContentHandler(ContentHandler handler);
  public ContentHandler getContentHandler(  );
  public void           setErrorHandler(ErrorHandler handler);
  public ErrorHandler   getErrorHandler(  );
     
  public void parse(InputSource input) throws IOException, SAXException;
  public void parse(String systemID) throws IOException, SAXException;
     
}