Hello, I am trying to parse a simple XML document with DOM in an HTML file using javascript. My HTML code looks like this: <HTML> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!---Hide from non-JavaScript Browsers var xmlDoc = new ActiveXObject ("Microsoft.XMLDOM"); xmlDoc.async="false"; xmlDoc.load("test.xml"); document.write("The first XML element in the file contains: <BR>"); document.write("xmlDoc.documentElement.firstChild.text); //Stop Hiding > </SCRIPT> <TITLE>DOM Testing</TITLE> </HEAD> <BODY> HELLO </BODY> </HTML> When I try to view this page in my browser, I get a blank page. My XML file is not empty and it should give me the results that I want. What could be the problem? Thank You and waiting for a quick reply. Sincerely Yours, Salman Mazhar.Received on Monday, 4 April 2005 17:29:18 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 October 2009 08:24:57 GMT