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 using the #import preprocessor directive.

To load an XML DOM object from an XML data file, you use the load method.

This project uses or creates the following files.

Source: loadDOM.cppCreates an XML DOM object and loads the resource file into the project's main directory.
Resource: stocks.xmlAn XML data file.
OutputThis is the output you should get when you build and run the loadDOM project.

To create the loadDOM Visual C++ Project

  1. 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.