Thank you for the awesome work done in SharpKML.
I am trying to extract the KML file within a KMZ archive and suspect I am missing a simple step. I've looked through the forum and also read the documentation about the changes made to the KML-KMZ libraries about loading KMZ files. The KMZ file I am attempting
to load is from the National Weather Service Radar groundoverlays. There is only one kml file inside named doc.kml with the following header.
<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://earth.google.com/kml/2.0
I am using the pre-compiled SharpKMZ libraries.
Here is the code I am having problems with...
using (FileStream myFileStream = new FileStream(Application.StartupPath.ToString() + "\MPX_Radar_data.kmz", FileMode.Open))
KmzFile myKmz = KmzFile.Open(myFileStream);
myKmlFile = myKmz.GetDefaultKmlFile();
Kml kml = myKmlFile.Root as Kml;
Problem is that "myKmlFile" root is null. However the output of myKmz.ReadKml() shows the contents of the doc.kml. I must be missing something.