code: function(node) {
              var nodeList = this.getElementsByTagNameNS(node, this.internalns,
                                                         "LinearRing");
              var numRings = nodeList.length;
              var components = new Array(numRings);
              if(numRings > 0) {
                  // this assumes exterior ring first, inner rings after
                  var ring;
                  for(var i=0, len=nodeList.length; i<len; ++i) {
                      ring = this.parseGeometry.linestring.apply(this,
                                                          [nodeList[i], true]);
                      if(ring) {
                          components[i] = ring;
                      } else {
                          throw "Bad LinearRing geometry: " + i;
                      }
                  }
              }
              return new OpenLayers.Geometry.Polygon(components);
          }
docs: Method: parseGeometry.polygon
  Given a KML node representing a polygon geometry, create an
  OpenLayers polygon geometry.
  
  Parameters:
  node - {DOMElement} A KML Polygon node.
  
  Returns:
  {<OpenLayers.Geometry.Polygon>} A polygon geometry.