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
5
0
0
Visit site
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

Forum statistics

Threads
323,126
Messages
2,243,304
Members
428,031
Latest member
quicktravo