public static IEnumerable<PageInfo> ParseList(XDocument doc)
 {
     return from PageInfo page in (from XElement el in doc.Ancestors("Page")
                                   select Parse(el))
                where page.IsValid()
                select page;
 }
        private static IEnumerable<XElement> LoadXmlFile(string path)
        {
            XDocument catalogDoc = new XDocument();
            IEnumerable<XElement> resultXml = null;

            catalogDoc = XDocument.Load(path);
            resultXml = catalogDoc.Ancestors();

            return resultXml;
        }