Share via


ISAXDTDHandler Interface

 

The ISAXDTDHandler/IVBSAXDTDHandler interface receives notification of basic document type definition (DTD)-related events.

Methods

notationDecl Receives notification of a notation declaration event.
unparsedEntityDecl Receives notification of an unparsed entity declaration event.

If a Simple API for XML (SAX) application requires information about notations and unparsed entities, the application implements this interface and registers an instance with the SAX2 reader using the dtdHandler property. This DTDHandler instance reports notation and unparsed entity declarations to the application.

The IVBSAXDTDHandler interface includes methods that are invoked by the reader during the parsing operation. The reader passes the appropriate information to the method's parameters. To perform some type of processing for a method, you simply add code to the method in the DTDHandler implementation. In general, it's rare that you would call these methods yourself from within the DTDHandler. As such, the syntax shown for the IVBSAXDTDHandler interface focuses on the implementation syntax, rather than usage syntax.

Important

The SAX2 reader passes string values to IVBSAXDTDHandler methods by reference, rather than by value.

If a Simple API for XML (SAX) application requires information about notations and unparsed entities, the application implements this interface and registers an instance with the SAX2 reader using the putDTDHandler method. The instance of the DTDHandler reports notation and unparsed entity declarations to the application.

Remarks

This interface includes only those DTD events that the XML recommendation requires processors to report: notation and unparsed entity declarations.

The reader can report these events in any order, regardless of the order in which the notations and unparsed entities were declared. However, all DTD events must be reported after the ContentHandler's startDocument event, and before the first startElement event.

It is up to the application to store the information for future use (perhaps in a hash table or object tree). If the application encounters attributes of type NOTATION, ENTITY, or ENTITIES, it can use the information that it obtained through this interface to find the entity or notation corresponding to the attribute value.

Requirements

Implementation:

msxml3.dll (MSXML 3.0)

msxml6.dll (MSXML 6.0)

Header and LIB files: msxml2.h, msxml2.lib

Versioning

Implemented in: MSXML 3.0 and later

See Also

dtdHandler Property (Visual Basic)
putDTDHandler Method (C-C++)
startDocument Method
startElement Method