DeclHandler (Java Platform SE 7 ) (original) (raw)


public interface DeclHandler
SAX2 extension handler for DTD declaration events.

This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.
This is an optional extension handler for SAX2 to provide more complete information about DTD declarations in an XML document. XML readers are not required to recognize this handler, and it is not part of core-only SAX2 distributions.
Note that data-related DTD declarations (unparsed entities and notations) are already reported through the DTDHandler interface.
If you are using the declaration handler together with a lexical handler, all of the events will occur between thestartDTD and theendDTD events.
To set the DeclHandler for an XML reader, use thesetProperty method with the property namehttp://xml.org/sax/properties/declaration-handler and an object implementing this interface (or null) as the value. If the reader does not report declaration events, it will throw aSAXNotRecognizedException when you attempt to register the handler.
Since:
SAX 2.0 (extensions 1.0)

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2020, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.