public void ListSearch(int ct, int list) { iblbs.Clear(); iblnb.Clear(); iblad.Clear(); XmlString = this.InterFind(ct, list); doc = new XmlDocument(); doc.LoadXml(XmlString); XmlNode node = doc.SelectSingleNode("channel"); InterBook book = null; foreach (XmlNode el in node.SelectNodes("item")) { book = InterBook.MakeBook(el, list); if (list == 0) { iblbs.Add(book); } else if (list == 1) { iblnb.Add(book); } else if (list == 2) { iblad.Add(book); } } }
public void BookSearch(string str, int i) { abld.Clear(); XmlString = InterBookFind(i, str); doc = new XmlDocument(); doc.LoadXml(XmlString); //doc.Save("search.xml"); XmlNode node = doc.SelectSingleNode("channel"); InterBook book = null; foreach (XmlNode el in node.SelectNodes("item")) { book = InterBook.MakeBook(el, 0); abld.Add(book); } }