What's New in the April 2001 Microsoft XML Parser 4.0

The Microsoft XML Parser (MSXML) 4.0 Technology Preview Release is a preliminary release of MSXML 4.0. This technology preview provides a solid look at a number of important new features of MSXML 4.0. It also offers fixes for known problems, improved performance, more samples, and more complete documentation

Most prominent among the additions to the technology preview is the support of the latest World Wide Web Consortium (W3C) XML Schema, Proposed Recommendation, dated March 30, 2001. Representative of this support are two new MXSML 4.0 features:

XML Schema Definition (XSD) language validation in the DOM

XSD support in XML Path Language (XPath) and Extensible Stylesheet Language Transformations (XSLT)
This technology preview also extends MSXML's support for sequential XML processing architectures, based on the de facto standard, Simple API for XML (SAX 2). This extension includes:

Integration between the DOM and SAX parsing models, as demonstrated by DOM-to-SAX and SAX-to-DOM conversions using the SAXXMLReader and MXXMLWriter objects

Generation of HTML from a stream of SAX events, similar to the way that the element in XSLT can generate HTML from a result tree

A helper object that allows you to manually keep track of namespace declarations
This article outlines some of the new features found in the technology preview. It also briefly describes a utility that helps developers create C++ SAX applications, and discusses how to use MSXML 4.0 in side-by-side mode. For more detailed information about all the features available in the MSXML 4.0 Technology Preview, see the MSXML SDK that accompanies the parser.

Note Any new features added to MSXML 3.0 continue to be supported in this technology preview.

XML Schema Support
There are two features in this technology preview that provide XML Schema support. The first, and most important, feature is the ability to validate XML documents in the DOM using the XML Schema. Currently, validation has to be done automatically using the XMLSchemaCache object. You can use all the XML Schema features except regular expressions, which will be supported in a later release. While adding support for the latest XML Schema recommendation, the MSXML 4.0 Technology Preview continues to support XML-Data Reduced (XDR) and document type definition (DTD) validations.

The second new schema feature is support of the XML Schema in XPath and, consequently, in XSLT. With additional extension functions, permitted by XPath and XSLT standards, you can check nodes for XSD types and presence of schema information, sort and compare strings and time-date values, and convert strings to numbers in a manner conformant with the XSD specification.

Note This technology preview supports the latest W3C XML Schema, Proposed Recommendation (March 30, 2001). MSXML will support the final recommendation soon after it becomes available.

Extended Support for Sequential XML Processing Architectures In this technology preview, there are three ways in which MSXML extends its support for sequential XML processing architectures, based on the SAX2 API:

Integration between the DOM and SAX parsing models

Generation of HTML output

Tracking of namespace declarations
Integration of the SAX and DOM Models
Now, you can use the MXXMLWriter object to generate SAX events out of a DOM tree and, likewise, build a DOM tree out of SAX events. This feature allows you to closely integrate DOM and SAX in your applications.

Generation of HTML Output
A new object, MXHTMLWriter, allows you to output HTML using a stream of SAX events, much in the same way that the element in XSLT can generate HTML from a result tree. The new MXHTMLWriter object provides necessary support for high-performing Active Server Pages (ASP), which read XML documents with a SAX reader, put those documents through custom SAX filters, and output the data to the user as an HTML page. The MXHTMLWriter object is also useful for a number of other applications, like the manual generation of HTML pages.

Tracking of Namespace Declarations
The new MXNamespaceManager object allows you to manually track namespace declarations and resolve them either in the current context or in the context of a particular DOM node. While MSXML supports namespaces, and can automatically resolve names of elements and attributes, there are more and more cases where an attribute's value or an element's content uses qualified names. For example, the following code uses a qualified name for the genre and style attributes. The new MXNamespaceManager object is readily able to track and resolve these qualified names.

Note The MXNamespaceManager object completely implements the functionality of the NamespaceSupport class specified in the SAX2 bug-fix prerelease (2000-12-28).

Utility for Creating C++ SAX Applications
To simplify development of C++-based SAX components, there is the SaxAppWizard utility for Microsoft Visual Studio. With this utility, you can quickly develop backbone SAX applications just like console or WFC applications are developed when creating a new project.

Note The SaxAppWizard utility is available for download separately from the MSXML 4.0 Technology Release and MSXML 4.0 Technology Release SDK.

Side-by-Side Functionality
The MSXML 4.0 Technology Preview has the new ProgIDs and CLSIDs for the version-independent components included in this release. Also, the technology preview has different names for the MSXML DLLs installed on your computer-msxml4.dll, msxml4a.dll and msxml4r.dll. By installing new DLLS in this way, the MSXML parser can be installed in side-by-side mode without replacing any previously installed versions of MSXML (for example MSXML 2.0, MSXML 2.6, or MSXML 3.0).

Working with the MSXML 4.0 Technology Preview in side-by-side mode means that you need to be more conscientious about how you use CLSIDs and ProgIDs in your applications. After you install the MSXML 4.0 Technology Preview, calling applications using version-independent CLSIDs and ProgIDs will reference msxml4.dll. However, to ensure stability in your applications, it is recommended that you use version-dependent CLSIDs and ProgIDs instead.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.