• Welcome to the all-new Windows Central Forums! - We're still moving some things around, so you may see a few quirks here and there, but we're working on getting things fully completed as soon as possible. For now, take a look around, and if you run into any major issues, please let us know in this thread!

How to read a xml file stored in a application local folder in windows phone 8.1 app development

om narayan dixit

New member
Jul 8, 2015
Hi All,

I am new in windows application development.I am looking for code which help me to read the content of xml file stored in the application local folder.

Description : In my application once user clicks on the submit button,I have stored the user status as "true" in xml file using below code :
Windows.Storage.StorageFolder localFolder = Windows.Storage.ApplicationData.Current.LocalFolder;
var stream = await localFolder.CreateFileAsync(FILENAME, CreationCollisionOption.ReplaceExisting);

string Usercontent = "<?xml version='1.0'?>";
Usercontent = "<Name> : "+signup_Username.Text+"</Name>";
Usercontent += "\n <Phone> : " + signup_Number.Text + "</Phone>";
Usercontent += "\n <Email> : " + signup_Email.Text + "</Email>";
Usercontent += "\n <Password> : " + signup_Password.Password + "</Password>";
Usercontent += "\n LoginStatus : " + true + "";

await FileIO.WriteTextAsync(stream, Usercontent);
But once the user again enter in my application I want to check the user status whether "true" or "false" by reading this above created file content.
This is offline process to check the logged in status in a local mobile.

Platform - Windows phone 8.1
XAML and C#

Can you please someone help me to implement this functionality.

Members online

No members online now.

Forum statistics

Latest member