Serialize an XML DOM Object to a File (JScript)

 

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.js JScript source code.
Output Output from the application.

To create the SaveDOMToFile JScript project

  1. Create a JScript Project. For detailed instructions on how to do this, see Set Up My JScript Project.

  2. Name the project SaveDOMToFileProj.

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