private List <EpgNext> debug_epg_next(string data) { try { List <EpgNext> list_en = new List <EpgNext>(); XmlDocument doc = new XmlDocument(); doc.LoadXml(data); foreach (XmlElement xitem in doc.DocumentElement.SelectNodes("//item")) { EpgNext en = new EpgNext(); XmlDocument idoc = new XmlDocument(); idoc.LoadXml("<root>" + xitem.InnerXml + "</root>"); foreach (XmlElement link in idoc.DocumentElement.SelectNodes("//ts")) { en.ts = link.InnerText; } foreach (XmlElement link in idoc.DocumentElement.SelectNodes("//progname")) { en.progname = link.InnerText; } list_en.Add(en); } return(list_en); } catch (Exception) { throw new System.InvalidOperationException("Error to load epg next"); } }
private List<EpgNext> debug_epg_next(string data) { try { List<EpgNext> list_en = new List<EpgNext>(); XmlDocument doc = new XmlDocument(); doc.LoadXml(data); foreach (XmlElement xitem in doc.DocumentElement.SelectNodes("//item")) { EpgNext en = new EpgNext(); XmlDocument idoc = new XmlDocument(); idoc.LoadXml("<root>" + xitem.InnerXml + "</root>"); foreach (XmlElement link in idoc.DocumentElement.SelectNodes("//ts")) { en.ts = link.InnerText; } foreach (XmlElement link in idoc.DocumentElement.SelectNodes("//progname")) { en.progname = link.InnerText; } list_en.Add(en); } return list_en; } catch (Exception) { throw new System.InvalidOperationException("Error to load epg next"); } }