问题
Possible Duplicate:
How to parse xml with Classic asp?
I want to load one XML file in classic ASP.
I am using
blnFileExists = objDom.Load(Server.MapPath("\a\abcfiles\admin\image_name.xml"))
but when I write blnFileExists it gives me false.
What should I do?
回答1:
Write the contents of objDOM.parseError.reason to the response to find out why it didn't load.
回答2:
Verify the file path is as you have it written. The way you have it written, the file image_name.xml should be in C:\Inetpub\wwwroot\a\abcfiles\admin. If that's not the case, then there's part of the problem.
You may want to instead give Server.MapPath a virtual path, like "/a/abcfiles/admin/image_name.xml". This path will be resolve to http://www.yourWebSite.com/a/abcfiles/admin/image_name.xml. Again, if this is not the correct path, adjust it as necessary.
来源:https://stackoverflow.com/questions/7584095/how-to-load-xml-file-in-classic-asp