I have a plist in this format:
Title&
Yes, there is an easier way:
XDocument doc = XDocument.Load("input.xml");// plist file name
var chapters = (from d in doc.Root.Element("array").Elements("dict")
select new Chapter
{
Title = (string)d.Element("string"),
SubTitles = d.Element("array")
.Elements("dict")
.Elements("string")
.Select(s => (string)s)
.ToList()
}).ToList();
You didn't show your classes, so I assumed it looks like that:
class Chapter
{
public string Title { get; set; }
public List<string> SubTitles { get; set; }
}