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:

Source: LoadXMLFile.jsJScript source code.
Resource: test.xmlExternal XML file to be loaded into DOM.
OutputOutput 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.