FileDocCategorySizeDatePackage
SAXParserHandler.javaAPI DocJava SE 6 API3544Tue Jun 10 00:23:00 BST 2008com.sun.org.apache.xml.internal.resolver.readers

SAXParserHandler

public class SAXParserHandler extends DefaultHandler
An entity-resolving DefaultHandler.

This class provides a SAXParser DefaultHandler that performs entity resolution.

author
Norman Walsh Norman.Walsh@Sun.COM
version
1.0

Fields Summary
private EntityResolver
er
private ContentHandler
ch
Constructors Summary
public SAXParserHandler()


    
    super();
  
Methods Summary
public voidcharacters(char[] ch, int start, int length)

    if (this.ch != null) {
      this.ch.characters(ch, start, length);
    }
  
public voidendDocument()

    if (ch != null) {
      ch.endDocument();
    }
  
public voidendElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)

    if (ch != null) {
      ch.endElement(namespaceURI, localName, qName);
    }
  
public voidendPrefixMapping(java.lang.String prefix)

    if (ch != null) {
      ch.endPrefixMapping(prefix);
    }
  
public voidignorableWhitespace(char[] ch, int start, int length)

    if (this.ch != null) {
      this.ch.ignorableWhitespace(ch, start, length);
    }
  
public voidprocessingInstruction(java.lang.String target, java.lang.String data)

    if (ch != null) {
      ch.processingInstruction(target, data);
    }
  
public org.xml.sax.InputSourceresolveEntity(java.lang.String publicId, java.lang.String systemId)


    if (er != null) {
      try {
	return er.resolveEntity(publicId, systemId);
      }	catch (IOException e) {
	  System.out.println("resolveEntity threw IOException!");
	  return null;
      }
    } else {
      return null;
    }
  
public voidsetContentHandler(org.xml.sax.ContentHandler ch)

    this.ch = ch;
  
public voidsetDocumentLocator(org.xml.sax.Locator locator)

    if (ch != null) {
      ch.setDocumentLocator(locator);
    }
  
public voidsetEntityResolver(org.xml.sax.EntityResolver er)

    this.er = er;
  
public voidskippedEntity(java.lang.String name)

    if (ch != null) {
      ch.skippedEntity(name);
    }
  
public voidstartDocument()

    if (ch != null) {
      ch.startDocument();
    }
  
public voidstartElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)

    if (ch != null) {
      ch.startElement(namespaceURI, localName, qName, atts);
    }
  
public voidstartPrefixMapping(java.lang.String prefix, java.lang.String uri)

    if (ch != null) {
      ch.startPrefixMapping(prefix, uri);
    }