By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,495 Members | 1,321 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,495 IT Pros & Developers. It's quick & easy.

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

P: 2
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 from the process. =(

Now the original XML file is generated from a Java based Lotus Notes Agent. I have tested the XML output in IE/FireFox/Opera which opens up and displays the output 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 but errors. =(

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

Expand|Select|Wrap|Line Numbers
  1. <%
  2. var XMLParser = new ActiveXObject("MSXML2.DOMDocument.3.0");
  3. XMLParser.async = false;
  4.  
  5. try
  6. {
  7. // Error: The system cannot locate the specified resource.
  8. //XMLParser.load("http://Subdomain.ExternalDomain.com/JimsTest.nsf/List.xml"); // From Notes Agent
  9. //XMLParser.load("http://ExternalDomain.com/foreclosure/List.xml"); // Locally Saved File
  10.  
  11. // Error: No data is available for the requested resource.
  12. //XMLParser.load("http://InternalIPAddress/JimsTest.nsf/List.xml"); // From Notes Agent
  13.  
  14. // Error: The filename, directory name, or volume label syntax is incorrect.
  15. //XMLParser.load("\\InternalUNC\foreclosure/List.xml"); // Locally Saved File
  16. //XMLParser.load("D:\LocalPath\foreclosure\List.xml"); // Locally Saved File
  17.  
  18. // Error: The system cannot locate the object specified.
  19. //XMLParser.load("List.xml"); // Locally Saved File
  20.  
  21. if (XMLParser.parseError.errorCode!= 0)
  22. {
  23. var myErr = XMLParser.parseError;
  24. %>
  25. <strong>XML Parser Error:</strong> <%= myErr.reason %>, <%= myErr.line %> <br />
  26. <%
  27. } // end if block
  28. } catch (error)
  29. {
  30. error.printStackTrace();
  31. } // end catch block
  32.  
  33. var ForeclosureList = XMLParser.getElementsByTagName("Foreclosure");
  34. %> 
Feb 14 '07 #1
Share this Question
Share on Google+
1 Reply


P: 2
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.
Feb 27 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.