Forum Moderators: open

Message Too Old, No Replies

Loading XML via SS Javascript (ASP)

Error while loading an XML file via SS Javascript ASP

         

FreeXenon

6:30 pm on Feb 8, 2007 (gmt 0)

10+ Year Member



OK, I am having a lot of problems loading an XML file via a
Server-Side Javascript based ASP page. Below is the code that I am
using as well as the different methods of loading the XML file and
the associated errors that I am getting in the process. =(

Now the original XML file is generated from a Lotus Notes Agent. I have tested that and IE/FireFox/Opera access and open up the file just fine as XML. I have also taken the output and created an XML file locally to load it as one of the examples. Nothing. =(

I ma hoping that some one can help make sense of this. Please?

<%
var XMLParser = new ActiveXObject("MSXML2.DOMDocument.3.0");
XMLParser.async = false;

try
{
// Error: The system cannot locate the specified resource.
//XMLParser.load("http://Subdomain.ExternalDomain.com/JimsTest.nsf/List.xml"); // From Notes Agent
//XMLParser.load("http://ExternalDomain.com/foreclosure/List.xml"); // Locally Saved File

// Error: No data is available for the requested resource.
//XMLParser.load("http://InternalIPAddress/JimsTest.nsf/List.xml"); // From Notes Agent

// Error: The filename, directory name, or volume label syntax is incorrect.
//XMLParser.load("\\InternalUNC\foreclosure/List.xml"); // Locally Saved File
//XMLParser.load("D:\LocalPath\foreclosure\List.xml"); // Locally Saved File

// Error: The system cannot locate the object specified.
//XMLParser.load("List.xml"); // Locally Saved File

if (XMLParser.parseError.errorCode!= 0)
{
var myErr = XMLParser.parseError;
%>
<strong>XML Parser Error:</strong> <%= myErr.reason %>, <%= myErr.line %> <br />
<%
} // end if block
} catch (error)
{
error.printStackTrace();
} // end catch block

var ForeclosureList = XMLParser.getElementsByTagName("Foreclosure");
%>