ISAXDeclHandler

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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, "https://xml.org/sax/properties/declaration-handler", as shown in the following code sample.

... SAXXMLReader * r = ...
SAXDeclHandler * dh = new SAXDeclHandler();
r->putProperty("https://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
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

XML SAX Interfaces