Share via


ISAXLexicalHandler:IUnknown (Windows CE 5.0)

Send Feedback

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 StartDocument and endDocument events.

To set the lexical handler for the reader, use the 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
comment This method receives XML comments from inside or outside the document element, including comments in the external document type definition (DTD) or schema subset.
endCDATA This method receives the end of a character data (CDATA) section.
startCDATA This method receives the beginning of a CDATA section.
endDTD This method receives the end of a document type declaration.
startDTD This method receives the beginning of a document type declaration.
endEntity This method indicates that the reader has opened and finished processing an externally defined entity in the content of the document.
startEntity 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

OS Versions: Windows CE .NET 4.0 and later.
Header: Msxml2.h, Msxml2.idl.
Link Library: Uuid.lib.

See Also

endDocument Method | StartDocument Method | putProperty Method

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.