Write Annotations

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - SOM Developer's Guide

Write Annotations

This sample application writes annotations to all types of objects: IXMLDOMDocument, IXMLDOMNode, IVBSAXContentHandler, and ISAXContentHandler. First, the code instantiates a schema cache object, a DOM Document object, and a Sax writer object. The DOM Schema Cache is used to store the XML Schema. The schema object is obtained by the getSchema method of the IXMLDOMSchemaCollection2 interface. The writeAnnotation method of the ISchemaItem interface creates the annotations in the separate objects. The documentElement and output properties echo the declaration text of the annotations that are created.

This topic is divided into the following sections.