ASP running error: Missing object: 'xmlDoc.documentElement' error solution, friends in need can refer to it below
The ASP page that was originally running normally suddenly prompted the following message today:
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 target="main">Subclass 11</a>]]></item>
<item><![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.