Contents Index Topic Contents | ||
Previous Topic: XML Object Model Next Topic: Sample 1: Parsing an XML file |
Overview
The most generic object model for an XML document will be able to take in any XML document as input and provide to the application a means of manipulating this XML document. For more information on XML, see http://www.microsoft.com/sitebuilder/standards/xml/.
Note Applications should not use fibers on any thread on which the XML Object Model is created by calling IPersistMoniker::Load, since the Msxml.dll uses fibers for asynchronous downloads and they may interfere with each other.
XML-based documents are currently being used for at least two different applications for Microsoft Internet Explorer 4.0:
- CDF files (Channel Definition Format), where a channel is a Web site that has been enabled for Webcasting to information-receiving programs such as Internet Explorer 4.0. The mechanism that makes this possible in Internet Explorer 4.0 is the CDF file. The CDF file provides an index of resources available in the channel, and a recommended schedule for when the channel should be updated on the local computer.
- XML-based documents are also being used in Internet Explorer 4.0 for describing download modules for download of code in the form of cabinet files, Java packages, and so on. This new format is meant to supersede .inf files and is called the Open Software Description (OSD) format.
The interfaces in the following section describe a minimal set of objects that can be used to construct an object model for XML. In the future (post Internet Explorer 4.0), this object model will be extended to allow for a richer set of methods. The goals for the design of this set of interfaces as well as the justification for those goals are, in order of priority:
- The object model should enable the ability to manipulate any generic XML document. However, the methods needed for manipulating a CDF were highest in priority.
- The feel of the object model should mimic that of the IE4/MSHTML object model as closely as possible. This is to enable a programmer familiar with IE4/MSHTML to get started easily.
Object Model Overview
The object model is free-threaded, thus no marshaling is required.
An XML document can be thought of as a tree. A container tag is a nonleaf node in this tree. Tags that do not contain any other tags end up as leaf nodes of this tree. A root element whose children are all the top-level nodes is imposed.
Samples
This section contains some simple implementations of the XML object model. The samples are:
- Sample 1: Parsing an XML file
- Sample 2: Parsing a CDF file for specific tags
- Sample 3: Using IPersistMoniker::Load to load a document
- Sample 4: Parsing an XML file using JScript
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.