Beispiel #1
0
        public static List <T> findElementsOfType <T>(KmlFile file, Type t)
        {
            List <object> tempList = new List <object>();

            file.findElementsOfType <T>(tempList);
            List <T> result = tempList.ConvertAll(delegate(object x) { return((T)x); });

            return(result);
        }
Beispiel #2
0
        public static KmlFile fromFile(string filename, Logger log)
        {
            XmlDocument doc = new XmlDocument();

            doc.Load(filename);
            KmlFile result = new KmlFile(doc, log);

            return(result);
        }
Beispiel #3
0
 public static bool toFile(KmlFile doc, string filename)
 {
     try {
         XmlDocument result = doc.ToXml();
         if (null != result)
         {
             result.Save(filename);
             return(true);
         }
         return(false);
     } catch (Exception ex) {
         Console.WriteLine(ex.Message);
         return(false);
     }
 }