FileDocCategorySizeDatePackage
DefaultHandler2.javaAPI DocJava SE 6 API3805Tue Jun 10 00:27:36 BST 2008org.xml.sax.ext

DefaultHandler2

public class DefaultHandler2 extends DefaultHandler implements DeclHandler, LexicalHandler, EntityResolver2
This class extends the SAX2 base handler class to support the SAX2 {@link LexicalHandler}, {@link DeclHandler}, and {@link EntityResolver2} extensions. Except for overriding the original SAX1 {@link DefaultHandler#resolveEntity resolveEntity()} method the added handler methods just return. Subclassers may override everything on a method-by-method basis.
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

Note: this class might yet learn that the ContentHandler.setDocumentLocator() call might be passed a {@link Locator2} object, and that the ContentHandler.startElement() call might be passed a {@link Attributes2} object.

since
SAX 2.0 (extensions 1.1 alpha)
author
David Brownell
version
TBS

Fields Summary
Constructors Summary
public DefaultHandler2()
Constructs a handler which ignores all parsing events.

 
Methods Summary
public voidattributeDecl(java.lang.String eName, java.lang.String aName, java.lang.String type, java.lang.String mode, java.lang.String value)

public voidcomment(char[] ch, int start, int length)

 
public voidelementDecl(java.lang.String name, java.lang.String model)

public voidendCDATA()

public voidendDTD()

public voidendEntity(java.lang.String name)

public voidexternalEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId)

public org.xml.sax.InputSourcegetExternalSubset(java.lang.String name, java.lang.String baseURI)
Tells the parser that if no external subset has been declared in the document text, none should be used.

 return null; 
public voidinternalEntityDecl(java.lang.String name, java.lang.String value)

public org.xml.sax.InputSourceresolveEntity(java.lang.String name, java.lang.String publicId, java.lang.String baseURI, java.lang.String systemId)
Tells the parser to resolve the systemId against the baseURI and read the entity text from that resulting absolute URI. Note that because the older {@link DefaultHandler#resolveEntity DefaultHandler.resolveEntity()}, method is overridden to call this one, this method may sometimes be invoked with null name and baseURI, and with the systemId already absolutized.

 return null; 
public org.xml.sax.InputSourceresolveEntity(java.lang.String publicId, java.lang.String systemId)
Invokes {@link EntityResolver2#resolveEntity EntityResolver2.resolveEntity()} with null entity name and base URI. You only need to override that method to use this class.

 return resolveEntity (null, publicId, null, systemId); 
public voidstartCDATA()

public voidstartDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)

public voidstartEntity(java.lang.String name)