I want to load my xml file in my app and read just specific tags from my xml. Can someone help me? I have tried couple of things but all I get is the full xml text, not the specific tags.
This is the code:
try
{
StorageFolder storageFolder = Package.Current.InstalledLocation;
StorageFile storageFile = await storageFolder.GetFileAsync("players2.xml");
XmlTextBlock.Text = await FileIO.ReadTextAsync(storageFile, Windows.Storage.Streams.UnicodeEncoding.Utf8);
}
catch (Exception ex)
{
XmlTextBlock.Text = ex.Message;
}
and my xml is:
<player>
<name>Ricardo Ferreira Rodrigues</name>
<shirtnumber>1</shirtnumber>
</player>
I want to see the results in txtname and txtshirtnumber. Someone can help?