I am successfully parsing an XML document using the javascript below.  I am
running into trouble, however, when I try to parse an xml file that doesn't
exist in the same directory as the calling page.  See inline comments below.

 

var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");

 

function loadXML(xmlFile){

xmlDoc.async="false";

            xmlDoc.onreadystatechange=verify;

            xmlDoc.load(xmlFile);

            xmlObj=xmlDoc.documentElement;

}

..

/* This line works */

var xmlFile="menu.xml";

/* This line doesn't work & throws js error */

var xmlFile="C:\test\menu.xml";

/* This line doesn't work, but doesn't throw any js error, either */

var xmlFile="C:/\test/\menu.xml";

..

loadXML(xmlFile);

 

 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220031
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to