Read XML File's certain value from Isolated Storage

zgivjlseioh

New Member
Hi I use this code to save an xml file \[code\]using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication()) { using (IsolatedStorageFileStream isoStream = new IsolatedStorageFileStream("test.xml", FileMode.Create, myIsolatedStorage)) { XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; using (XmlWriter writer = XmlWriter.Create(isoStream, settings)) { writer.WriteStartElement("t", "test", "urn:test"); writer.WriteStartElement("TestA", ""); writer.WriteString(lbTestA.Text); writer.WriteEndElement(); writer.WriteStartElement("TestB", ""); writer.WriteString(lbTestB.Text); writer.WriteEndElement(); writer.WriteEndDocument(); writer.Flush(); } } }\[/code\]And it created the right xml file checked with Isolated Storage Explorer for WP7, now I want to read only the values stored in the and Tags the only code I could use was this one \[code\]private void loadgame_Click(object sender, EventArgs e) { using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication()) { IsolatedStorageFileStream isoFileStream = myIsolatedStorage.OpenFile("test.xml", FileMode.Open); using (StreamReader reader = new StreamReader(isoFileStream)) { lsScore.DataContext = reader.ReadToEnd(); } } }\[/code\]But it just reads the whole xml file as it is just a text, any ideas ?
 
Back
Top