ytrctb Posted November 4, 2007 Share Posted November 4, 2007 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 More sharing options...
boen_robot Posted November 4, 2007 Share Posted November 4, 2007 Try to use a URL path instead i.e. xml.load("xmlfiles/support.xml") Note also the missing "/" at the start, as that leads you to the document root, and that location is not clear by your description, so it could be a problem.If you have ASP, why not use ASP to do the transformation BTW? Link to comment Share on other sites More sharing options...
ytrctb Posted November 4, 2007 Author Share Posted November 4, 2007 The locations in full are in:C:\Inepub\wwwroot\testpage\Default.aspC:\Inepub\wwwroot\testpage\xmlfiles\support.xml and support.xsltThe reason I am not using server side code is because there is some other javascript client code after the xml, xsl load that manipulates the data. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.