I used below code:
var data = from query in loadedData.Descendants("chapter")
select new CountryData
{
Title = (string)query.Element("title"),
data1 = from pharagraph in loadedData.Descendants("pharagraph")
select new CountryData
{
Title1=(string)pharagraph.Element("title"),
Des = (string)pharagraph.Element("text"),
Position = (int)pharagraph.Element("position"),
}
};
countryList = data.ToList();
i had error when displaying Title1 value.how to display inner title tag in XML reader.my xml file look like:http://stackoverflow.com/questions/9431276/read-dynamic-xml-reader-for-windows-phone
Probably select
pharagraphnot fromloadedData:But from
pharagraphselement (or something like that depending on your xml):Full-code: