开发者

how to load xml file in classic asp [duplicate]

This question already has answers here: Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜