Connecting Tech Pros Worldwide Help | Site Map

XML path

Newbie
 
Join Date: Aug 2007
Posts: 7
#1: Aug 2 '07
Hi,

I'm working on a program (C sharp in .NET Compact Framework). I'm trying to read an XML file. It's seems everything ok but I can't get the path right. I have created the file inside the solution. Do you have any suggestions?

Many thanks,
Xloi
Newbie
 
Join Date: Aug 2007
Posts: 7
#2: Aug 2 '07

re: XML path


Quote:

Originally Posted by xloi

Hi,

I'm working on a program (C sharp in .NET Compact Framework). I'm trying to read an XML file. It's seems everything ok but I can't get the path right. I have created the file inside the solution. Do you have any suggestions?

Many thanks,
Xloi


I used

m_settingsPath = Path.GetDirectoryName(System.Reflection.Assembly.G etExecutingAssembly().GetName().CodeBase);
m_settingsPath += @"\Settings.xml";

to get the path
and

System.Xml.XmlDocument xdoc = new XmlDocument();
xdoc.Load(@"Settings.xml");

but neither of those worked..I'm new at C sharp and I can't figure out what am I doing wrong.

Thanks again
Xloi
Reply