how to load xml file in classic asp [duplicate]

一曲冷凌霜 提交于 2019-12-11 06:48:26

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!