文件结构我已经能生成出来 也可用了 具体代码该怎么写 

解决方案 »

  1.   

     //插入数据
                string path = @"E:\niu.kml";
                XmlDocument xmlDoc = new XmlDocument();
                xmlDoc.Load(path);
                XmlNode xn = xmlDoc.SelectSingleNode("kml/Document");            XmlElement pl = xmlDoc.CreateElement("Place");
                xn.AppendChild(pl);            XmlElement des = xmlDoc.CreateElement("description");
                des.InnerText = "Time:" + System.DateTime.Now.ToString() + "   Coord:" + xx.ToString() + "," + yy.ToString() + "   Speed:" + "23km/h";//设置节点文本   
                pl.AppendChild(des);//添加到<Place>节点中               XmlElement poi = xmlDoc.CreateElement("Point");
                pl.AppendChild(poi);            XmlElement coor = xmlDoc.CreateElement("coordinates");
                coor.InnerText = xx.ToString() + "," + yy.ToString() + " ";
                poi.AppendChild(coor);            xmlDoc.Save(path);
                xx += 0.003;
                yy += 0.002;汗 都没人来帮忙 
    自己找到了 谁来回个帖 分还有人要不咯