public override void LoadDetails(XmlNode node, KmlRoot owner) { base.LoadDetails(node, owner); foreach (XmlNode child in node.ChildNodes) { KmlFeature newChild = null; switch (child.Name) { case "NetworkLink": newChild = new KmlNetworkLink(); break; case "Placemark": newChild = new KmlPlacemark(); break; case "PhotoOverlay": newChild = new KmlPhotoOverlay(); break; case "ScreenOverlay": newChild = new KmlScreenOverlay(); break; case "GroundOverlay": newChild = new KmlGroundOverlay(); break; case "Folder": newChild = new KmlFolder(); break; case "Document": newChild = new KmlDocument(); break; } if (newChild != null) { newChild.sky = this.sky; newChild.LoadDetails(child, owner); if (children == null) { children = new List<KmlFeature>(); } children.Add(newChild); } } }
public void LoadDetails(XmlNode node) { foreach (XmlNode child in node.ChildNodes) { KmlFeature newChild = null; switch (child.Name) { case "NetworkLink": newChild = new KmlNetworkLink(); break; case "Placemark": newChild = new KmlPlacemark(); break; case "PhotoOverlay": newChild = new KmlPhotoOverlay(); break; case "ScreenOverlay": newChild = new KmlScreenOverlay(); break; case "GroundOverlay": newChild = new KmlGroundOverlay(); break; case "Folder": newChild = new KmlFolder(); break; case "Document": newChild = Document = new KmlDocument(); break; } if (newChild != null) { newChild.sky = this.sky; newChild.LoadDetails(child, this); children.Add(newChild); } } lastUpdate = DateTime.Now; }