Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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 ISAXDTDHandlerinterface.
If you are using the DeclHandler together with a LexicalHandler, all of the events occur between the ISAXLexicalHandler::startDTD Methodand ISAXLexicalHandler::endDTD Methodevents.
To set the DeclHandler for a SAX2 reader, use the
ISAXXMLReader::putProperty Methodmethod with the property ID,
"http://xml.org/sax/properties/declaration-handler"
,
as shown in the following code sample.
Copy Code | |
---|---|
... SAXXMLReader * r = ... SAXDeclHandler * dh = new SAXDeclHandler(); r->putProperty("http://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 |