ISAXDeclHandler
A version of this page is also available for
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 |
---|---|
Reports an attribute type declaration. |
|
Reports an element type declaration. |
|
Reports a parsed external entity declaration. |
|
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 |