public static KmlDocument Load(XmlDocument xmlDocument)
        {
            KmlDocument kdoc = null;
            XmlNodeList list = xmlDocument.GetElementsByTagName("Document");

            if (list.Count > 0)
            {
                XmlNode head = list[0];
                kdoc = new KmlDocument(ParseFolder(head));

                foreach (XmlNode node in head)
                {
                    string name = node.Name.ToLower();
                    switch (name)
                    {
                    case "style": kdoc.Styles.Add(ParseStyle(node)); break;

                    case "stylemap": kdoc.StyleMaps.Add(ParseStyleMap(node)); break;
                    }
                }
            }

            return(kdoc);
        }
 public KmlDocument(KmlDocument doc) : base(doc)
 {
     Styles.AddRange(doc.Styles);
     StyleMaps.AddRange(doc.StyleMaps);
 }