Jump to content

how to read an xml file from "My Documents"


Recommended Posts

Posted

I'm a newbie to programing in windows mobile 5 using visual c#. What I'm trying to do is build an app that reads a xml file from "My Documents" and changes the data around to display it. How do i get my program to read the xml file? ;)

Posted
I'm a newbie to programing in windows mobile 5 using visual c#. What I'm trying to do is build an app that reads a xml file from "My Documents" and changes the data around to display it. How do i get my program to read the xml file? ;)

Have a look at: http://support.microsoft.com/kb/307548

Also, rather than hard code the path, use Environment.GetFolderPath(Environment.SpecialFolder.Personal) which will return the path of the My Documents folder!

  • 3 months later...
Guest kalkie2007
Posted

If you have a schema of the XML file you could use the xsd.exe tool to generate a class which has all the properties of the xml. To read the xml file in the class use the XmlSerializer. That way you won't have to parse the xml yourself.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.