Load an XML DOM Object from an XML File (C/C++)

MSXML 5.0 SDK

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

Load an XML DOM Object from an XML File (C/C++)

This project is functionally identical to the previous project, Include Headers and Libraries Manually. The difference is that in this example, the headers and libraries are loaded automatically by Visual Studio.

To load an XML DOM object from an XML data file, you use the load method. The following Microsoft Visual C++ 6.0 project illustrates this procedure.

This project uses or creates the following files.

Component Description
Source: loadDOM.cpp Creates an XML DOM object and loads the resource file into the project's main directory.
Resource: stocks.xml An XML data file.
Output This is the output you should get when you build and run the loadDOM project.

To create the loadDOM Visual C++ Project

  • Create a Win32 console application in Visual C++. For detailed instructions on how to do this, see Set Up My Visual C++ Project. Name the project LoadDOMFromFileProj.

Next, we'll add the source code for the loadDOM project.