ISAXLexicalHandler (Compact 2013)
3/26/2014
The ISAXLexicalHandler interface enables a Simple API for XML (SAX2) application to implement an optional extension handler for receiving information from the SAX2 reader, such as comments, the document type declaration, CDATA sections, and the start and end of an entity within a document. The events in the lexical handler apply to the entire document, not just to the document elements. Also note that all LexicalHandler events must appear between the content handler's ISAXContentHandler::startDocument Method and ISAXContentHandler::endDocument Method events.
To set the lexical handler for the reader, use the ISAXXMLReader::putProperty Method with the propertyId "http://xml.org/sax/properties/lexical-handler"
. The following code sample shows how to register the lexical handler.
... SAXXMLReader * r = ...
SAXLexicalHandler * lh = new SAXLexicalHandler ();
r->putProperty("http://xml.org/sax/properties/lexical-handler",lh);
Method |
Description |
---|---|
This method receives XML comments from inside or outside the document element, including comments in the external document type definition (DTD) or schema subset. |
|
This method receives the end of a character data (CDATA) section. |
|
This method receives the beginning of a CDATA section. |
|
This method receives the end of a document type declaration. |
|
This method receives the beginning of a document type declaration. |
|
This method indicates that the reader has opened and finished processing an externally defined entity in the content of the document. |
|
This method indicates that the reader has opened and started to process an internally or externally defined entity in the content of the document. |
Requirements
Header |
msxml2.h, |
Library |
uuid.lib |