Share via


ISAXDeclHandler (Compact 2013)

3/26/2014

This is an optional extension handler for Simple API for XML (SAX2) to provide information about DTD declarations in an XML document. Note that data-related DTD declarations (unparsed entities and notations) are already reported through the ISAXDTDHandler interface.

If you are using the DeclHandler together with a LexicalHandler, all of the events occur between the ISAXLexicalHandler::startDTD Method and ISAXLexicalHandler::endDTD Method events.

To set the DeclHandler for a SAX2 reader, use the ISAXXMLReader::putProperty Method method with the property ID, "http://xml.org/sax/properties/declaration-handler", as shown in the following code sample.

... SAXXMLReader * r = ...
SAXDeclHandler * dh = new SAXDeclHandler();
r->putProperty("http://xml.org/sax/properties/declaration-handler",dh);

Method

Description

ISAXDeclHandler::attributeDecl Method

Reports an attribute type declaration.

ISAXDeclHandler::elementDecl Method

Reports an element type declaration.

ISAXDeclHandler::externalEntityDecl Method

Reports a parsed external entity declaration.

ISAXDeclHandler::internalEntityDecl Method

Reports a parsed internal entity declaration.

Requirements

Header

msxml2.h,
msxml2.idl

Library

uuid.lib

See Also

Reference

XML SAX Interfaces