ASP running error: Missing object: 'xmlDoc.documentElement' error solution. Friends who need it can refer to the ASP page that originally ran normally. Today, it suddenly prompted:
Copy the code code as follows:
Microsoft VBScript runtime error error '800a01a8'
Missing object: 'xmlDoc.documentElement'
/work/Menu.asp, line 80
Find the relevant code as follows:
Copy the 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)
Could it be that the load was not successful? Take a look at the output:
Copy the code code as follows:
Response.Write(xmlDoc.xml)
If it is empty, there must be something wrong with the load. Checking Menu.xml, I found that the content of the xml file was changed at some point:
Copy the code code as follows:
<?xml version=1.0 encoding=gb2312?>
<index>
<catalog /><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 normally.