Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7702093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:08:52+00:00 2026-05-31T23:08:52+00:00

I am new to WP7. I followed this tutorial to read and write a

  • 0

I am new to WP7.
I followed this tutorial to read and write a xml file but when i read the xml file it only shows me the top row of xml file.I don’t know how to check weather the xml file is written properly by the program.So.

1.Where to check the xml files that are saved in isolated storage.

2.How to get out of this problem.

My code to Write Xml File In Isolated Storage:

      using (IsolatedStorageFile myIsolatedStorage =     
                            IsolatedStorageFile.GetUserStoreForApplication())
        {
            using (IsolatedStorageFileStream isoStream = new IsolatedStorageFileStream("mz1.xml", FileMode.Create, myIsolatedStorage))
            {
                XmlWriterSettings settings = new XmlWriterSettings();
                settings.Indent = true;
                using (XmlWriter writer = XmlWriter.Create(isoStream, settings))
                {
                    writer.WriteStartDocument();

                    writer.WriteStartElement("person");
                    writer.WriteElementString("node1", "value1");
                    writer.WriteEndElement();
                    writer.WriteEndDocument();
                    writer.Flush();
                }
            }
        }

Code to Read Xml File From Isolated Storage:

          using (IsolatedStorageFile myIsolatedStorage =          
                               IsolatedStorageFile.GetUserStoreForApplication())
            {
                IsolatedStorageFileStream isoFileStream =  
                         myIsolatedStorage.OpenFile("mz1.xml", FileMode.Open);
                using (StreamReader reader = new StreamReader(isoFileStream))
                {
                    textBlock1.Text= reader.ReadToEnd();
                }
            }

Output:

     <?xml version="1.0" encoding="utf-8"?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:08:53+00:00Added an answer on May 31, 2026 at 11:08 pm

    In response to your first question, you can download and install the WP7 Isolated Storage Explorer from codeplex here:
    http://wp7explorer.codeplex.com/

    Its really easy to use. Just add a couple lines of code to your app.xaml.cs and you’re all set.

    In regard to your second question, The code that you have there looks OK. I recently wrote a little WP7 app that did just this kind of thing as well. Here is some of that code:

    public List<Task> GetTasks()
    {
        var tasks = new List<Task>();
        using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication())
        {
            if (store.FileExists(XmlFile))
            {
                //store.DeleteFile(XmlFile);
                //XDocument doc = XDocument.Load(store.OpenFile(XmlFile, FileMode.Open));
                using (var sr = new StreamReader(new IsolatedStorageFileStream(XmlFile, FileMode.Open, store)))
                {
                    XDocument doc = XDocument.Load(sr);
                    tasks = (from d in doc.Descendants("task")
                             select new Task
                                        {
                                            Category = (string) d.Attribute("category"),
                                            Id = (string) d.Attribute("id"),
                                            Name = (string) d.Element("name"),
                                            CreateDate = (DateTime) d.Element("createdate"),
                                            DueDate = (DateTime) d.Element("duedate"),
                                            IsComplete = (bool) d.Element("isComplete")
                                        }).ToList<Task>();
                }
            }
        }
        return tasks;
    }
    

    its up to you, but you may want to consider using LinqToXml. It makes things a bit cleaner IMHO.

    I actually have a blog post that does all of this posted here:

    http://www.ritzcovan.com/2012/02/building-a-simple-windows-phone-apppart-2/

    and you can download all the code as well.
    I hope you find it helpful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to WP7 programming and I have been following this tutorial http://weblogs.asp.net/scottgu/archive/2010/03/18/building-a-windows-phone-7-twitter-application-using-silverlight.aspx
Sorry if this is a easy question but I am totally new to WP7.
New to xml. Looking for XPath to search a xml file with python ElementTree
Relatively new to C# and MVVM, but I'm making a WP7 app using the
Please help me, i am new to WP7 development.I have a class like this
In wp7 i want to parse xml tag .Xml : <top> <value name=Group A>
New to javascript/jquery and having a hard time with using this or $(this) to
New to both Ruby and Rails but I'm book educated by now (which apparently
New to WCF, but familiar with COM+ - can I wrap a WCF service
new Date(05-MAY-09 03.55.50) is any thing wrong with this ? i am getting illegalArgumentException

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.