Partager via


ISAXXMLReader (Compact 2013)

3/26/2014

The XML SAX feature for Windows Embedded Compact operating system (OS) provides two co-classes that implement the XML Reader interface.

  • SAXXMLReader
    The version-independent co-class. Uses the most current implementation. (CLSID_SAXXMLReader: 079aa557-4a18-424a-8eee-e39f0a8d41b9)
  • SAXXMLReader30
    The version-dependent co-class. Ties the application to msxml3.dll. (CLSID_SAXXMLReader30: 3124c396-fb13-4836-a6ad-1317f1713688)

Registering Handlers

An application can set and query features in the reader, register event handlers for document processing, and initiate a document parse. With this COM implementation of Simple API for XML (SAX2) in C++, the reader can use the following methods to register the corresponding handlers.

Method

Description

ISAXXMLReader::putContentHandler Method

Registers a content handler.

ISAXXMLReader::putDTDHandler Method

Registers a DTD handler.

ISAXXMLReader::putErrorHandler Method

Registers an error handler.

Controlling Reader Behavior

You can use the following methods to observe and control the behavior of the reader.

Method

Description

ISAXXMLReader::getFeature Method

Allows an application to ask the reader if it supports a feature.

ISAXXMLReader::putFeature Method

Allows an application to request that the reader turn a particular feature on or off.

Supported Features and Properties

The Microsoft COM/C++ implementation of SAX2 supports the following features, for example, a property whose value is Boolean:

  • "http://xml.org/sax/features/namespaces"
  • "http://xml.org/sax/features/namespace-prefixes"
  • "http://xml.org/sax/features/external-general-entitities"
  • "http://xml.org/sax/features/external-parameter-entities"
  • "normalize-line-breaks"
  • "server-http-request"

The reader also provides the ISAXXMLReader::getProperty Method and ISAXXMLReader::putProperty Method methods for getting and putting these properties.

  • "http://xml.org/sax/properties/lexical-handler"
  • "http://xml.org/sax/properties/declaration-handler"
  • "xmldecl-encoding"
  • "xmldecl-version"
  • "xmldecl-standalone"

Method

Description

ISAXXMLReader::getBaseURL Method

Returns the base URL for the document.

ISAXXMLReader::putBaseURL Method

Sets the base URL for the document.

ISAXXMLReader::getContentHandler Method

Returns the current content handler.

ISAXXMLReader::putContentHandler Method

Allows an application to register a content handler.

ISAXXMLReader::getDTDHandler Method

Returns the current DTD handler.

ISAXXMLReader::putDTDHandler Method

Allows an application to register a DTD handler.

ISAXXMLReader::getEntityResolver Method

Returns the current entity resolver. At this time, the EntityResolver property cannot be set for this implementation of SAX2 (Simple API for XML).

ISAXXMLReader::putEntityResolver Method

Allows an application to register an entity resolver. At this time, the EntityResolver property cannot be set for this implementation of SAX2 (Simple API for XML).

ISAXXMLReader::getErrorHandler Method

Returns the current error handler.

ISAXXMLReader::putErrorHandler Method

Allows an application to register an error handler.

ISAXXMLReader::getFeature Method

Returns the Boolean value of a feature.

ISAXXMLReader::putFeature Method

Sets the value of a feature.

ISAXXMLReader::getProperty Method

Returns the value of a property. (Currently no properties are supported.)

ISAXXMLReader::putProperty Method

Sets the value of a property.

ISAXXMLReader::getSecureBaseURL Method

Returns the secure base URL for the document.

ISAXXMLReader::putSecureBaseURL Method

Sets the secure base URL for the document.

ISAXXMLReader::parse Method

Parses an XML document.

ISAXXMLReader::parseURL Method

Parses an XML document from a system identifier.

Requirements

Header

msxml2.h,
msxml2.idl

Library

uuid.lib

See Also

Reference

XML SAX Interfaces