Originally running the normal ASP page, today suddenly prompted:
Copy Code code as follows:
Microsoft VBScript run-time error ' 800a01a8 '
Missing object: ' Xmldoc.documentelement '
/work/menu.asp, Line 80
Find the relevant code as follows:
Copy Code code as follows:
Set xmldoc=server.createobject ("Microsoft.XMLDOM")
Xmldoc.async = False
Xmldoc.load (Server.MapPath ("Menu.xml"))
Set root = XmlDoc.documentElement.selectSingleNode ("//index")
Wouldn't it be successful without load? The output reads:
Copy Code code as follows:
Response.Write (Xmldoc.xml)
Empty, it must be the load problem. Look at the next menu.xml, found the contents of the XML file did not know when changed:
Copy Code code as follows:
<?xml version= "1.0" encoding= "gb2312"?>
<index>
<catalog title= "Classification One" >
<item id= "Class1_1" ><! [Cdata[<a href= "class1_1.asp" target= "main" > Subclass 11</a>]]></item>
<item id= "Class1_2" ><! [Cdata[<a href= "class1_2.asp" target= "main" > Subclass 12</a>]]></item>
</catalog>
</index>
><! [Cdata[<a href= "Class2_3" target= "main" > Subclass 23</a>]]></item>
</catalog>
</index>
Modify the XML file, and then browse the page is normal.