Serialize an XML DOM Object to a File (Visual Basic)

MSXML 5.0 SDK

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

Serialize an XML DOM Object to a File (Visual Basic)

You might often need to persist a DOM object so that you can reuse it later, or to save the XML object that is output from an XSLT transformation. To do this, you can call the save method on the DOM object.

This tutorial uses or creates the following files:

File Description
Source: SaveDOMToFile.frm Visual Basic source code.
Output Output from the application.

To create the SaveDOMToFile Visual Basic Project

  1. Create a Visual Basic project and set a reference to MSXML 5.0. For detailed instructions on how to do this, see Set Up My Visual Basic Project.
  2. Name the project SaveDOMToFileProj.

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