public static Catalog Load(string directory_path) { if (!Directory.Exists (directory_path)) return null; string index_file = System.IO.Path.Combine (directory_path, "index.xml"); if (!File.Exists (index_file)) return null; XmlDocument doc = new XmlDocument (); using (XmlTextReader rdr = new XmlTextReader (index_file)) doc.Load (rdr); Catalog result = new Catalog (); result.path = directory_path; result.index_doc = doc; return result; }
public ViewItem(DocView view, Catalog catalog) { banner = new BannerItem (view, catalog); ns_label = new LabelItem (view, "Namespaces:"); namespaces = new NSItem [catalog.ChildCount]; for (int i = 0; i < catalog.ChildCount; i++) namespaces [i] = new NSItem (view, catalog [i] as NamespaceNode); }