Jump to content

XML/XSL.Load from a different folder


Recommended Posts

Hi,I have been trying to do this but it doesn't work.I have Default.asp in folder \testpage\Default.aspI have an xml and xslt file in \testpage\xmlfiles\support.xml and \testpage\xmlfiles\support.xsltHow do I call those in Default.asp?I tried xml.load("\xmlfiles\support.xml")and a whole bunch of possible ways..I am using plain javascript on client side to do this: (based on w3school)<script type="text/javascript">// Load XML var xml = new ActiveXObject("Microsoft.XMLDOM")xml.async = falsexml.load("cdcatalog.xml")// Load XSLvar xsl = new ActiveXObject("Microsoft.XMLDOM")xsl.async = falsexsl.load("cdcatalog.xsl")// Transformdocument.write(xml.transformNode(xsl))</script>The script will only work for xml, xsl files in the same directory as the asp.It didnt say how to do it for xml xsl files in a different directory.Help would be greatly appreciated.Thanks a lot

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...