File: ets_doc_to_s.rb

package info (click to toggle)
ruby-libxml 2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,812 kB
  • sloc: xml: 9,628; ruby: 7,119; ansic: 6,665; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 404 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# encoding: UTF-8

require './test_helper'

100.times do |count|

  xml_doc = XML::Document.new()
  xml_doc.encoding = "UTF-8"
  xml_doc.root = XML::Node.new("Request")

  1000.times do |index|

    xml_doc.root << node = XML::Node.new("row")
    node["user_id"] = index.to_s
    node << "600445"

  end

  xml_str = xml_doc.to_s
  print "\r#{count}"
  $stdout.flush
end
puts "\n"