Sha256: 3239a1f0a7d37e999bae9d96b4076f360dc440e58c7e2756605dc29d0cb81013

Contents?: true

Size: 542 Bytes

Versions: 45

Compression:

Stored size: 542 Bytes

Contents

# encoding: UTF-8

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(1000) do |n|
    trkpt = XML::Node.new 'trkpt'
    trkpt['lat'] = n.to_s
    trkpt['lon'] = n.to_s
    trkseg << trkpt
  end
end

Version data entries

45 entries across 45 versions & 2 rubygems

Version Path
smile-xml-1.0.5-java src/test/ruby/ets_gpx.rb
smile-xml-1.0.4-java src/test/ruby/ets_gpx.rb
libxml-ruby-2.8.0 test/ets_gpx.rb
smile-xml-1.0.3-java src/test/ruby/ets_gpx.rb
libxml-ruby-2.7.0-x86-mingw32 test/ets_gpx.rb
libxml-ruby-2.7.0 test/ets_gpx.rb
smile-xml-1.0.3-jruby src/test/ruby/ets_gpx.rb
libxml-ruby-2.6.0-x86-mingw32 test/ets_gpx.rb
libxml-ruby-2.6.0 test/ets_gpx.rb
libxml-ruby-2.5.0-x86-mingw32 test/ets_gpx.rb
libxml-ruby-2.5.0 test/ets_gpx.rb
libxml-ruby-2.4.0-x86-mingw32 test/ets_gpx.rb
libxml-ruby-2.4.0 test/ets_gpx.rb
smile-xml-1.0.2-jruby src/test/ruby/ets_gpx.rb
libxml-ruby-2.3.3-x86-mingw32 test/ets_gpx.rb
libxml-ruby-2.3.3 test/ets_gpx.rb
libxml-ruby-2.3.2 test/ets_gpx.rb
libxml-ruby-2.3.0-x86-mingw32 test/ets_gpx.rb
libxml-ruby-2.3.0 test/ets_gpx.rb
libxml-ruby-2.2.2-x86-mingw32 test/ets_gpx.rb