ASP run Error: Missing object: ' Xmldoc.documentelement ' ERROR resolution _ Application Tips

Source: Internet
Author: User
Tags cdata
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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.