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
Create a Visual Basic project and set a reference to MSXML 5.0 for Microsoft Office Applications. For detailed instructions on how to do this, see Set Up My Visual Basic Project.
Name the project SaveDOMToFileProj.
Next, we'll add the source code for this project.