how to load xml file in classic asp [duplicate]
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_开发者_StackOverflow社区name.xml"))
but when I write blnFileExists
it gives me false.
What should I do?
Write the contents of objDOM.parseError.reason
to the response to find out why it didn't load.
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.
精彩评论