Program with DOM in C/C++

MSXML 5.0 SDK

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

Program with DOM in C/C++

This tutorial is intended for C/C++ developers interested in writing XML applications using the DOM APIs as implemented in Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office. It includes a series of simple examples written in C and tested using Microsoft Visual C++ 6.0. The objective is to provide a quick and practical orientation, so that you can start to write your own XML applications.

These demonstrations are task-oriented, and are simplified for clarity. Therefore, their implementation is not always optimized.

This tutorial consists of the following demonstrations.

How Do I? Description
Get Ready to Work with MSXML (C/C++) Discusses the requirements for using MSXML, and describes how to install the MXSML components.
Set Up My Visual C++ Project Demonstrates how to set up a Visual C++ project to write your own XML applications in C/C++ using the XML DOM.
Include Headers and Libraries Manually Performs the same functions as the Load an XML DOM Object from an XML File example, but incorporate headers and libraries manually.
Load an XML DOM Object from an XML File (C/C++) Demonstrates how to create an XML DOM instance and load its content from an external XML data file.
Save an XML DOM Object to a File (C/C++) Demonstrates how to serialize an XML DOM object in a text file.
Perform XSL Transformations (C/C++) Demonstrates how to perform XLS Transformations.
Create an XML DOM Object Dynamically (C/C++) Demonstrates how to create an XML DOM object programmatically, including processing instructions, comments, elements, attributes, CDATA sections, and text nodes.
Query XML DOM Nodes (C/C++) Demonstrates how to query a DOM node or node-set using XPath expressions.
Validate an XML Document or Fragment (C/C++) Demonstrates how to validate an XML document and/or fragment against an XML Schema.
Manage Object Lifetime Using Reference Counting on Interface Pointers (C/C++) Demonstrates how to manage the life-time of DOM objects when using raw interface pointers.