def get_bounds_attr_value(el, possible_names)
      result = nil
      possible_names.each do |name|
        result = el[name]
        break unless result.nil?
      end
      (begin
        result.to_f
      rescue StandardError
        nil
      end)
    end
def get_bounds_attr_value(el, possible_names)
      result = nil
      possible_names.each do |name|
        result = el[name]
        break unless result.nil?
      end
      (begin
        result.to_f
      rescue StandardError
        nil
      end)
    end
This initializer can be used to create a new GPXFile from an existing
 file or to create a new GPXFile instance with no data (so that you can
 add tracks and points and write it out to a new file later).
 To read an existing GPX file, do this:
         gpx_file = GPXFile.new(:gpx_file => 'mygpxfile.gpx')
         puts "Speed: #{gpx_file.average_speed}"
         puts "Duration: #{gpx_file.duration}"
         puts "Bounds: #{gpx_file.bounds}"

 To read a GPX file from a string, use :gpx_data.
         gpx_file = GPXFile.new(:gpx_data => '<xml ...><gpx>...</gpx>)
 To create a new blank GPXFile instance:
         gpx_file = GPXFile.new
 Note that you can pass in any instance variables to this form of the initializer, including Tracks or Segments:
         some_track = get_track_from_csv('some_other_format.csv')
         gpx_file = GPXFile.new(:tracks => [some_track])