Name

The XMLReaderAdapter Class

Synopsis

XMLReaderAdapter is the reverse of ParserAdapter; it uses the Adapter design pattern to adapt a SAX2 XMLReader to a SAX1 Parser. This lets you use SAX2 parsers for legacy programs written to a SAX1 interface:

package org.xml.sax.helpers;
     
public class XMLReaderAdapter implements Parser, ContentHandler {
     
  public XMLReaderAdapter(  ) throws SAXException;
  public XMLReaderAdapter(XMLReader reader);
     
  // Implementation of org.xml.sax.Parser.
  public void setLocale(Locale locale) throws SAXException;
  public void setEntityResolver(EntityResolver resolver);
  public void setDTDHandler(DTDHandler handler);
  public void setDocumentHandler(DocumentHandler handler);
  public void setErrorHandler(ErrorHandler handler);
  public void parse(String systemID) throws IOException, SAXException;
  public void parse(InputSource input) throws IOException, SAXException
     
  // Implementation of org.xml.sax.ContentHandler.
  public void setDocumentLocator(Locator locator);
  public void startDocument(  ) throws SAXException;
  public void endDocument(  ) throws SAXException;
  public void startPrefixMapping(String prefix, String uri)
   throws SAXException;
  public void endPrefixMapping(String prefix) throws SAXException;
  public void startElement(String namespaceURI, String localName,
   String qualifiedName, Attributes atts) throws SAXException;
  public void endElement(String namespaceURI, String localName,
   String qualifiedName) throws SAXException;
  public void characters(char[  ] text, int start, int length)
   throws SAXException;
  public void ignorableWhitespace(char[  ] text, int start, int length)
   throws SAXException;
  public void processingInstruction(String target, String data)
   throws SAXException;
  public void skippedEntity(String name) throws SAXException;
     
}