Please review xml kml file attachment below for details.
SelectSingleNode is returning null from the path below. Review xml kml file to see what I am doing wrong below.
XmlNode n = kmlDoc.DocumentElement.SelectSingleNode("/kml/Document/Placemark/MultiGeometry/Polygon/outerBoundaryIs/LinearRing/coordinates");
Midhun TpPosted Sep 30, 2016, 2:59 AM
In your kml file, remove the portion marked in red from kml node.
David SmithPosted Sep 30, 2016, 7:40 AM
var xmlNode = kmlDoc.SelectSingleNode("kml/Document/Placemark/MultiGeometry/Polygon/outerBoundaryIs/LinearRing/coordinates");
if (xmlNode != null)
{
xmlNode.InnerText = KmlObjectString.ToString();
string[] nameArray = browseFile.SafeFileName.Split('.');
kmlDoc.Save(@"C:\temp\KML\" + nameArray[0] + ".kml");
}
Midhun TpPosted Sep 30, 2016, 7:23 AM
David SmithPosted Sep 30, 2016, 7:07 AM