XML path

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xloi
    New Member
    • Aug 2007
    • 7

    XML path

    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
  • xloi
    New Member
    • Aug 2007
    • 7

    #2
    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.GetDirecto ryName(System.R eflection.Assem bly.GetExecutin gAssembly().Get Name().CodeBase );
    m_settingsPath += @"\Settings.xml ";

    to get the path
    and

    System.Xml.XmlD ocument xdoc = new XmlDocument();
    xdoc.Load(@"Set tings.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

    Comment

    Working...