I see alot of examples on how to write data from an app to a file then put it in isolated storage. I do not want to write any data to my xml file, I just simply want to save
Include the XML file in your project files in Visual Studio, then in the Properties window make sure Build Action
is set to Content
and Copy to Output Directory
is set to Copy always
or Copy if newer
. This will include the file in the output XAP file.
To access this file in code use:
XDocument doc = XDocument.Load( "path/to/my/file.xml" );
Of course, it doesn't have to be XDocument
, you can use any XML reader class similarly.