This is a known issue when working with legacy files which do not follow the OGC standard.
I've updated the documentation and added a
Legacy Files section which should (hopefully) help in this case.
Sam you are definitely a programmer of the highest calibre. As a coder myself (trying to improve over the last 40 years or so), I must take my hat off to you. By gum, the solution you proposed did the trick! For any one reading this memo, Sam suggested loading
in legacy files (or any existing Google Earth file) by means of the following routine:-
private static KmlFile ParseLegacyFile(string path)
// Manually parse the Xml
string xml = File.ReadAllText(path);
Parser parser = new Parser();
parser.ParseString(xml, false); // Ignore the namespaces
// The element will be stored in parser.Root - wrap it inside a KmlFile.
return KmlFile.Create(parser.Root, true);
Great one Sam. I keep saying it but it's true - You did a great piece of work creating this library.