Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

Save an XML DOM Object to a File (C/C++)

Saving an XML DOM object is also known as serializing the DOM. It involves a call to the save method on the DOM object. To demonstrate this, we will create a DOM object, load a string into it, and save it to a file, myData.xml.

This project uses or creates the following files.

Component

Description

Source: saveDOM.cpp

Saves an XML DOM object, pXMLDom, to a new file.

Output

When you build and run the saveDOM project, you should get this output in a console window.

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

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.