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