Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP - Server.MapPath() XMLDOM error..any help?

Status
Not open for further replies.

dalvin200

Programmer
Oct 10, 2000
20
GB
Hi,

I am trying to load an XML file from a path ( using the XMLDOM, but everytime I try this it fails and gives me the following error:

Server.MapPath() error 'ASP 0173 : 80004005
Invalid Path Character
An invalid character was specified in the Path parameter for the MapPath method

Now the code I am using is:

Dim objXML
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = False
objXML.Load(Server.MapPath("
Its the last line which is failing.. and I cannot see any kind of invalid character in the path..

If I use a alternative path, ie, (C:\test\xml\file.xml) then the XML file loads fine, but its only with this http path that it doesn't seem to work.

Does anyone know what is going on?

Any ways around this, as I really need to access the XML file via the http method.

Any help is appreciated.

Thank you
 
Try giving it a relative path, ie if it's up a directory than use ../file.xml
The portion it doesn't like is the because that isn't a valid path, it's a URL, even if it is the localhost.
If the xml file is located on a remote machibe, consider using the XMLHTTP object to load it into your script.
-Tarwn The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch, and a user with an idea
-computer saying (Wiz Biz - Rick Cook)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top