Error while loading an XML file from Agent via SS Javascript ASP

OK, I am having a lot of problems loading an XML file via aServer-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 open up and display 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 am 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;

%>

XML Parser Error: <%= myErr.reason %>, <%= myErr.line %>

<%

} // end if block

} catch (error)

{

error.printStackTrace();

} // end catch block

var ForeclosureList = XMLParser.getElementsByTagName(“Foreclosure”);

%>

Subject: Error while loading an XML file from Agent via SS Javascript ASP

If you have something like Altova XML Spy you may want to make sure your XML is completely kosher, sometimes browsers are forgiving. If you don’t have Altova or something like that try putting your XML in here:

http://www.xml.com/pub/a/tools/ruwf/check.html

or look for some other web-based XML validation.

Another thing to look at is to make sure your server has TCP/IP access to that URL, in other words, fire up a browser on the server and enter these URLs on that browser. There could be something blocking the server’s access to the URL that isn’t blocking your client from accessing the same URL.

Subject: RE: Error while loading an XML file from Agent via SS Javascript ASP

I have validated the XML syntax and validated it verses a DTD.

I have also been able to access the XML file from all methods via a browser which displayed it as XML.

I opened up the XML file (locally and from URL) from XML Spy, as well.

The XML seems to be OK, so my reading method must be incorrect. Ugghhh!

Thanks

Subject: RE: Error while loading an XML file from Agent via SS Javascript ASP

It turns out that using DOMDocument.means you can only access files on your local system (atleast that is the way it appears). I used an XMLHTTP and that easily solved the problem. Thanks for you response. I really appreciate you taking the time.