1

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?

Community
  • 1
  • 1
user818671
  • 389
  • 4
  • 8
  • 21

2 Answers2

0

Write the contents of objDOM.parseError.reason to the response to find out why it didn't load.

AnthonyWJones
  • 187,081
  • 35
  • 232
  • 306
0

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.

JFrancis
  • 365
  • 1
  • 10