Sha256: 87883e0975d15cf6e09736aab2d4fb808d8084f172c832802ffa0889213fd50a
Contents?: true
Size: 458 Bytes
Versions: 3
Compression:
Stored size: 458 Bytes
Contents
#!/usr/bin/ruby require "#{File.dirname($0)}/../smart" $stdout.sync = true stime = Time.now.to_f nums = 100000 # Watch the power 0.upto(nums) { |i| doc = XML::Smart.open(File.dirname($0) + "/EXAMPLE.xml") nodes = doc.root.find("/test/names/name[6]") nodes.first.parent.add("name", { "team" => "2" }, "Egon") print "#{i}/#{nums} runs#{13.chr}" if i % 100 == 0 } puts "#{nums} parses from a file and some work done: #{Time.now.to_f - stime} seconds"
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ruby-xml-smart-0.1.12.1-i486-linux | examples/replace.rb |
ruby-xml-smart-0.1.12-i486-linux | examples/replace.rb |
ruby-xml-smart-0.1.11-i486-linux | examples/replace.rb |