Load an XML File into a DOM Object (JScript)

 

To process XML data serialized as an XML file on the file system, you use the load method on an XML DOM object, supplying the file path as the input.

This tutorial uses or creates the following files:

File Description
Source: LoadXMLFile.js JScript source code.
Resource: test.xml External XML file to be loaded into DOM.
Output Output from the application.

To create the LoadXMLFile JScript project

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

  2. Name the folder LoadXMLFileProj.

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