private static void LoadPopularBills() { ArrayList popularbills = new ArrayList(); XmlDocument populars = new XmlDocument(); try { Hashtable usedsubjs = new Hashtable(); populars.Load("/home/govtrack/data/misc/popularbills.xml"); foreach (XmlElement m in populars.SelectNodes("popular-bills/bill")) { BillMonitor mon = (BillMonitor)Monitor.FromString("bill:" + m.GetAttribute("id")); string billtitle = mon.Display().ToLower(); string terms = ""; foreach (XmlElement t in m.SelectNodes("search-string")) { if (billtitle.IndexOf(t.InnerText) >= 0) { continue; } if (terms != "") { terms += ", "; } terms += '"' + t.InnerText + '"'; } Hashtable h = new Hashtable(); h["monitor"] = mon.Encoded(); h["title"] = mon.Display(); h["link"] = mon.Link(); h["terms"] = terms; popularbills.Add(h); if (popularbills.Count > 30) { break; } } } catch { } PopularBills = popularbills; }