Name

DeclHandler

Synopsis

This extension interface defines methods that a SAX parser can call to notify an application about element, attribute, and entity declarations in a DTD. If your application requires this information about a DTD, then pass an object that implements this interface to the setProperty( ) method of an XMLReader, using the property name “http://www.xml.org/sax/properties/declaration-handler”. Because this is an extension handler, SAX parsers are not required to support it, and may throw a SAXNotRecognizedException or a SAXNotSupportedException when you attempt to register a DeclHandler.

public interface DeclHandler {
// Public Instance Methods
     void attributeDecl(String eName, String aName, String type, 
        String mode, String value) throws org.xml.sax.SAXException;  
     void elementDecl(String name, String model) 
        throws org.xml.sax.SAXException;  
     void externalEntityDecl(String name, String publicId, 
        String systemId) throws org.xml.sax.SAXException;  
     void internalEntityDecl(String name, String value) 
        throws org.xml.sax.SAXException;  
}

Implementations

DefaultHandler2

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.