kml is an xml format used by Google Maps for specifying a map and markers and other things in the GMap. I have a model Carrier which has_many :addresses. Each Address has the standard fields (address1, address2, city, state, zip) as well as geocode latitude and longitude strings. Is it trivial to render a Carrier's addresses in a kml file? I hope I can include something like this in the carrier controller:
def render_kml(carrier) @carrier = Carrier.find(carrier) render :kml => @carrier.addresses end
But I know that I will have to massage the address fields into the kml xml schema.
Does anyone know any tutorials for rendering collections into xml formats?
Thanks in advance!