Reading XML Schema

S

Steve

I have a simple webserver that returns information about the server. One of
the web methods returns a dataset with the relevant information.

It uses an xml schema:

DataSet ds = new DataSet();

ds.ReadXmlSchema(@"C:\Inetpub\wwwroot\ServerInfo\ServerInfo.xsd");

Is there a way of pointing to the schema file without having to give the
long path above? I thought I could use
'System.IO.Directory.getCurrentDirectory()', but that returns
'c:\windows\system32'. So can you point to the project folder easily???

cheers in advance


Steve
 
G

Guest

Hi Steve,
you could possibly use Server.MapPath method. Given a virtual directory
in your website it will return the physical path on disk where the file
resides.

Hope that helps
Mark R Dawson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top