Sha256: ae57d4c8424b123f51948e32d0c38827e88f8db62d0210d3f90beb145a3146f7

Contents?: true

Size: 496 Bytes

Versions: 4

Compression:

Stored size: 496 Bytes

Contents

require 'libxml'

100.times do
  doc = XML::Document.new
  doc.encoding = 'UTF-8'

  root = XML::Node.new 'gpx'
  root['version'] = '1.0'
  root['creator'] = 'OpenStreetMap.org'
  root['xmlns'] = "http://www.topografix.com/GPX/1/0/"

  doc.root = root

  track = XML::Node.new 'trk'
  doc.root << track

  trkseg = XML::Node.new 'trkseg'
  track << trkseg

  1.upto(10000) do |n|
    trkpt = XML::Node.new 'trkpt'
    trkpt['lat'] = n.to_s
    trkpt['lon'] = n.to_s
    trkseg << trkpt
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
libxml-ruby-0.5.3 test/ets_gpx.rb
libxml-ruby-0.5.4 test/ets_gpx.rb
libxml-ruby-0.6.0 test/ets_gpx.rb
libxml-ruby-0.6.0-x86-mswin32-60 test/ets_gpx.rb