private static IEnumerable <AniDbPersonInfo> ParseCharacterList(string xml) { var doc = XDocument.Parse(xml); var people = new List <AniDbPersonInfo>(); var characters = doc.Element("characters"); if (characters != null) { foreach (var character in characters.Descendants("character")) { var seiyuu = character.Element("seiyuu"); if (seiyuu != null) { var person = new AniDbPersonInfo { Name = ReverseNameOrder(seiyuu.Value) }; var picture = seiyuu.Attribute("picture"); if (picture != null && !string.IsNullOrEmpty(picture.Value)) { person.Image = "https://cdn.anidb.net/images/main/" + picture.Value; } var id = seiyuu.Attribute("id"); if (id != null && !string.IsNullOrEmpty(id.Value)) { person.Id = id.Value; } people.Add(person); } } } return(people); }