Note that `node.nodeName` is the qualified name (e.g. 'foo:bar').  The namespace prefix ('foo' in this case) is not known until parse time.  The `node.namespaceURI` and `node.localName` are known ahead of time.

This works for KML because Google Earth barfs if `http://www.opengis.net/kml/2.2` is not the default namespace so everybody follows.  And since the KML docs use the `gx` prefix, for the `http://www.google.com/kml/ext/2.2` namespace, everybody follows.  But in general, XML documents can use whatever alias/prefix they want for a particular namespace URI.  When you get into parsing other formats, relying on the qualified name (i.e. `node.nodeName`) will be brittle.