libxml-ruby 0.8.1-x86-mswin32-60 → 0.8.2-x86-mswin32-60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. data/CHANGES +21 -0
  2. data/RAKEFILE +213 -0
  3. data/README +32 -11
  4. data/doc/rdoc/classes/LibXML.html +4 -0
  5. data/doc/rdoc/classes/LibXML/XML.html +7 -0
  6. data/doc/rdoc/classes/LibXML/XML/Attr.html +187 -177
  7. data/doc/rdoc/classes/LibXML/XML/Attributes.html +62 -61
  8. data/doc/rdoc/classes/LibXML/XML/Document.html +318 -254
  9. data/doc/rdoc/classes/LibXML/XML/Dtd.html +62 -8
  10. data/doc/rdoc/classes/LibXML/XML/Error.html +6 -0
  11. data/doc/rdoc/classes/LibXML/XML/HTMLParser.html +59 -41
  12. data/doc/rdoc/classes/LibXML/XML/InputCallbacks.html +12 -6
  13. data/doc/rdoc/classes/LibXML/XML/NS.html +65 -50
  14. data/doc/rdoc/classes/LibXML/XML/Node.html +671 -630
  15. data/doc/rdoc/classes/LibXML/XML/Node/FailedModify.html +12 -0
  16. data/doc/rdoc/classes/LibXML/XML/Node/Set.html +64 -60
  17. data/doc/rdoc/classes/LibXML/XML/Node/SetNamespace.html +12 -0
  18. data/doc/rdoc/classes/LibXML/XML/Node/UnknownType.html +12 -0
  19. data/doc/rdoc/classes/LibXML/XML/Parser.html +407 -383
  20. data/doc/rdoc/classes/LibXML/XML/Parser/Context.html +241 -219
  21. data/doc/rdoc/classes/LibXML/XML/Parser/ParseError.html +12 -0
  22. data/doc/rdoc/classes/LibXML/XML/Reader.html +421 -331
  23. data/doc/rdoc/classes/LibXML/XML/RelaxNG.html +237 -0
  24. data/doc/rdoc/classes/LibXML/XML/SaxParser.html +79 -60
  25. data/doc/rdoc/classes/LibXML/XML/Schema.html +109 -22
  26. data/doc/rdoc/classes/LibXML/XML/State.html +6 -0
  27. data/doc/rdoc/classes/LibXML/XML/XInclude.html +6 -0
  28. data/doc/rdoc/classes/LibXML/XML/XInclude/Error.html +6 -0
  29. data/doc/rdoc/classes/LibXML/XML/XPath.html +4 -48
  30. data/doc/rdoc/classes/LibXML/XML/XPath/Context.html +6 -5
  31. data/doc/rdoc/classes/LibXML/XML/XPath/InvalidPath.html +61 -0
  32. data/doc/rdoc/classes/LibXML/XML/XPath/Object.html +12 -8
  33. data/doc/rdoc/classes/LibXML/XML/XPointer.html +14 -8
  34. data/doc/rdoc/classes/LibXML/XML/XPointer/Context.html +6 -0
  35. data/doc/rdoc/classes/LibXML/XML/XPointer/Context/InvalidPath.html +6 -0
  36. data/doc/rdoc/classes/LibXML/XML/XPointer/InvalidExpression.html +13 -0
  37. data/doc/rdoc/created.rid +1 -1
  38. data/doc/rdoc/files/CHANGES.html +38 -10
  39. data/doc/rdoc/files/LICENSE.html +1 -1
  40. data/doc/rdoc/files/README.html +57 -23
  41. data/doc/rdoc/files/VERSION.html +1 -1
  42. data/doc/rdoc/files/ext/libxml/cbg_c.html +1 -1
  43. data/doc/rdoc/files/ext/libxml/libxml_c.html +1 -1
  44. data/doc/rdoc/files/ext/libxml/ruby_xml_attr_c.html +1 -1
  45. data/doc/rdoc/files/ext/libxml/ruby_xml_attributes_c.html +1 -1
  46. data/doc/rdoc/files/ext/libxml/ruby_xml_document_c.html +1 -1
  47. data/doc/rdoc/files/ext/libxml/ruby_xml_dtd_c.html +1 -1
  48. data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_c.html +1 -1
  49. data/doc/rdoc/files/ext/libxml/ruby_xml_input_cbg_c.html +1 -1
  50. data/doc/rdoc/files/ext/libxml/ruby_xml_node_c.html +1 -1
  51. data/doc/rdoc/files/ext/libxml/ruby_xml_node_set_c.html +1 -1
  52. data/doc/rdoc/files/ext/libxml/ruby_xml_ns_c.html +1 -1
  53. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_c.html +1 -1
  54. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_context_c.html +1 -1
  55. data/doc/rdoc/files/ext/libxml/ruby_xml_reader_c.html +1 -1
  56. data/doc/rdoc/{classes/XML.html → files/ext/libxml/ruby_xml_relaxng_c.html} +16 -35
  57. data/doc/rdoc/files/ext/libxml/ruby_xml_sax_parser_c.html +1 -1
  58. data/doc/rdoc/files/ext/libxml/ruby_xml_schema_c.html +1 -1
  59. data/doc/rdoc/files/ext/libxml/ruby_xml_state_c.html +1 -1
  60. data/doc/rdoc/files/ext/libxml/ruby_xml_xinclude_c.html +1 -1
  61. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_c.html +1 -1
  62. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_context_c.html +1 -1
  63. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_object_c.html +1 -1
  64. data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_c.html +1 -1
  65. data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_context_c.html +1 -1
  66. data/doc/rdoc/files/lib/libxml/attr_rb.html +1 -1
  67. data/doc/rdoc/files/lib/libxml/attributes_rb.html +1 -1
  68. data/doc/rdoc/files/lib/libxml/document_rb.html +1 -1
  69. data/doc/rdoc/files/lib/libxml/node_rb.html +1 -1
  70. data/doc/rdoc/files/lib/libxml/node_set_rb.html +1 -1
  71. data/doc/rdoc/files/lib/libxml/parser_options_rb.html +1 -1
  72. data/doc/rdoc/files/lib/libxml/parser_rb.html +1 -1
  73. data/doc/rdoc/files/lib/libxml/properties_rb.html +1 -1
  74. data/doc/rdoc/files/lib/libxml/tree_rb.html +1 -1
  75. data/doc/rdoc/files/lib/libxml_rb.html +2 -2
  76. data/doc/rdoc/files/lib/xml/libxml_rb.html +12 -2
  77. data/doc/rdoc/files/lib/xml_rb.html +134 -0
  78. data/doc/rdoc/fr_class_index.html +1 -1
  79. data/doc/rdoc/fr_file_index.html +2 -0
  80. data/doc/rdoc/fr_method_index.html +349 -344
  81. data/ext/libxml/libxml.c +2 -1
  82. data/ext/libxml/ruby_libxml.h +1 -0
  83. data/ext/libxml/ruby_xml_attr.c +8 -2
  84. data/ext/libxml/ruby_xml_attributes.c +5 -5
  85. data/ext/libxml/ruby_xml_document.c +41 -2
  86. data/ext/libxml/ruby_xml_dtd.c +169 -169
  87. data/ext/libxml/ruby_xml_html_parser.c +449 -449
  88. data/ext/libxml/ruby_xml_input_cbg.c +165 -165
  89. data/ext/libxml/ruby_xml_node.c +1 -1
  90. data/ext/libxml/ruby_xml_node_set.c +172 -172
  91. data/ext/libxml/ruby_xml_ns.c +145 -145
  92. data/ext/libxml/ruby_xml_parser.c +1398 -1398
  93. data/ext/libxml/ruby_xml_parser_context.c +697 -697
  94. data/ext/libxml/ruby_xml_reader.c +44 -0
  95. data/ext/libxml/ruby_xml_reader.h +14 -14
  96. data/ext/libxml/ruby_xml_relaxng.c +97 -0
  97. data/ext/libxml/ruby_xml_relaxng.h +15 -0
  98. data/ext/libxml/ruby_xml_sax_parser.c +486 -486
  99. data/ext/libxml/ruby_xml_schema.c +1 -1
  100. data/ext/libxml/ruby_xml_state.c +4 -4
  101. data/ext/libxml/ruby_xml_xinclude.c +21 -21
  102. data/ext/libxml/ruby_xml_xpath.c +89 -89
  103. data/ext/libxml/ruby_xml_xpath_context.c +283 -283
  104. data/ext/libxml/ruby_xml_xpath_object.c +5 -5
  105. data/ext/libxml/ruby_xml_xpointer.c +104 -104
  106. data/ext/libxml/ruby_xml_xpointer_context.c +22 -22
  107. data/ext/libxml/version.h +2 -2
  108. data/ext/libxml/version.h.rej +17 -0
  109. data/ext/mingw/Rakefile +41 -0
  110. data/{mingw → lib}/libiconv-2.dll +0 -0
  111. data/lib/libxml.rb +15 -4
  112. data/lib/libxml2-2.dll +0 -0
  113. data/lib/libxml_ruby.dll.a +0 -0
  114. data/lib/libxml_ruby.so +0 -0
  115. data/lib/xml.rb +14 -0
  116. data/lib/xml/libxml.rb +4 -1
  117. data/test/etc_doc_to_s.rb +1 -1
  118. data/test/ets_copy_bug.rb +1 -1
  119. data/test/ets_copy_bug3.rb +1 -1
  120. data/test/ets_doc_file.rb +1 -1
  121. data/test/ets_doc_to_s.rb +1 -1
  122. data/test/ets_node_gc.rb +1 -1
  123. data/test/ets_tsr.rb +1 -1
  124. data/test/model/shiporder.rnc +28 -0
  125. data/test/model/shiporder.rng +86 -0
  126. data/test/{tc_xml_attributes.rb → tc_attributes.rb} +1 -10
  127. data/test/{tc_xml_document.rb → tc_document.rb} +1 -1
  128. data/test/{tc_xml_document_write.rb → tc_document_write.rb} +1 -1
  129. data/test/{tc_xml_dtd.rb → tc_dtd.rb} +1 -1
  130. data/test/{tc_xml_html_parser.rb → tc_html_parser.rb} +1 -1
  131. data/test/{tc_xml_node.rb → tc_node.rb} +1 -1
  132. data/test/{tc_xml_node_attr.rb → tc_node_attr.rb} +1 -1
  133. data/test/{tc_xml_node_cdata.rb → tc_node_cdata.rb} +24 -5
  134. data/test/{tc_xml_node_comment.rb → tc_node_comment.rb} +1 -1
  135. data/test/{tc_xml_node_copy.rb → tc_node_copy.rb} +1 -1
  136. data/test/{tc_xml_node_edit.rb → tc_node_edit.rb} +1 -1
  137. data/test/{tc_xml_node_set.rb → tc_node_set.rb} +1 -1
  138. data/test/{tc_xml_node_set2.rb → tc_node_set2.rb} +1 -1
  139. data/test/{tc_xml_node_text.rb → tc_node_text.rb} +1 -1
  140. data/test/{tc_xml_node_xlink.rb → tc_node_xlink.rb} +2 -2
  141. data/test/{tc_xml_parser.rb → tc_parser.rb} +1 -1
  142. data/test/{tc_xml_parser_context.rb → tc_parser_context.rb} +1 -1
  143. data/test/{tc_xml_properties.rb → tc_properties.rb} +1 -7
  144. data/test/{tc_xml_reader.rb → tc_reader.rb} +1 -1
  145. data/test/tc_relaxng.rb +39 -0
  146. data/test/{tc_xml_sax_parser.rb → tc_sax_parser.rb} +1 -1
  147. data/test/{tc_xml_schema.rb → tc_schema.rb} +1 -1
  148. data/test/{tc_xml_traversal.rb → tc_traversal.rb} +1 -1
  149. data/test/{tc_xml_xinclude.rb → tc_xinclude.rb} +1 -1
  150. data/test/{tc_xml_xpath.rb → tc_xpath.rb} +1 -1
  151. data/test/{tc_xml_xpath_context.rb → tc_xpath_context.rb} +1 -1
  152. data/test/{tc_xml_xpointer.rb → tc_xpointer.rb} +1 -1
  153. data/test/test_suite.rb +26 -25
  154. metadata +103 -100
  155. data/benchmark/depixelate.rb +0 -632
  156. data/benchmark/hamlet.xml +0 -9055
  157. data/benchmark/sock_entries.xml +0 -507
  158. data/benchmark/throughput.rb +0 -39
  159. data/benchmark/xml_benchmarks.rb +0 -227
  160. data/mingw/libxml2-2.dll +0 -0
  161. data/mingw/libxml_ruby.so +0 -0
  162. data/test/gc.log +0 -0
  163. data/vc/libxml_ruby.sln +0 -20
  164. data/vc/libxml_ruby.vcproj +0 -389
@@ -1,39 +0,0 @@
1
- require 'rubygems'
2
- require 'hpricot'
3
- require 'libxml'
4
- require 'rexml/document'
5
-
6
- ITERATIONS = 3
7
- NESTED_ITERATIONS = 5
8
-
9
- def bm(name, filename, &block)
10
- text = File.open(filename).read
11
- length = text.length / 1024.0 / 1024.0
12
- puts "#{filename}: #{name} (#{(length * 1024).round} kb)"
13
- for j in 0 .. NESTED_ITERATIONS
14
- s = Time.now.to_f
15
- for i in 0 .. ITERATIONS
16
- block.call(text)
17
- end
18
- timer = Time.now.to_f - s
19
- puts "\t#{length * ITERATIONS / timer} MB/s"
20
- end
21
- end
22
-
23
- def bm_suite(filenames)
24
- filenames.each do |filename|
25
- bm("LIBXML THROUGHPUT:", filename) do |text|
26
- XML::Document.file(filename)
27
- end
28
-
29
- bm("HPRICOT THROUGHPUT:", filename) do |text|
30
- Hpricot.XML(text)
31
- end
32
-
33
- bm("REXML THROUGHPUT:", filename) do |text|
34
- REXML::Document.new(text)
35
- end
36
- end
37
- end
38
-
39
- bm_suite("hamlet.xml")
@@ -1,227 +0,0 @@
1
- # From: https://svn.concord.org/svn/projects/trunk/common/ruby/xml_benchmarks/
2
- #
3
- # Each test has an XML Parser open a 98k XML document
4
- # and count one type of leaf element (466 entries).
5
- # This is repeated a total of 50 time sfor each Parser.
6
- #
7
- # These results were produced on:
8
- # MacBook Pro
9
- # 2.33 GHz Intel Core 2 Duo
10
- # 4 GB memory
11
- # running MacOS X 10.5.2
12
- #
13
- # Ruby versions tested:
14
- # MRI: ruby 1.8.6 (2007-09-24 patchlevel 111) [universal-darwin9.0]
15
- # JRuby: ruby 1.8.6 (2008-03-20 rev 6255) [i386-jruby1.1RC3] on Java 1.5.0_13
16
- # JRuby: ruby 1.8.6 (2008-03-20 rev 6255) [i386-jruby1.1RC3] on Java 1.6.0_03 (Soylatte)
17
- #
18
- # Library versions MRI:
19
- # libxml-ruby 0.5.2.0
20
- # hpricot 0.6
21
- #
22
- # Library versions JRuby:
23
- # hpricot 0.6.161
24
- # jrexml 0.5.3
25
- #
26
- # Summary data: 100 iterations, timings from second set
27
- #
28
- # Platform and method total time
29
- # -----------------------------------------------------------
30
- # JRuby (Java 1.6.0) jdom_document_builder 0.363
31
- # MRI: libxml 0.389
32
- # JRuby (Java 1.6.0 server) jdom_document_builder 0.412
33
- # JRuby (server) jdom_document_builder 0.617
34
- # JRuby: jdom_document_builder 1.451
35
- # MRI: hpricot 2.056
36
- # JRuby (Java 1.6.0 server) hpricot 2.272
37
- # JRuby (Java 1.6.0) hpricot 2.273
38
- # JRuby (server) hpricot 3.447
39
- # JRuby: hpricot 6.198
40
- # JRuby (Java 1.6.0 server) rexml 6.251
41
- # JRuby (Java 1.6.0) rexml 6.356
42
- # MRI: rexml 7.624
43
- # JRuby (server) rexml 9.609
44
- # JRuby: rexml 12.944
45
- #
46
- # Detailed data:
47
- #
48
- # $ ruby ./xml_benchmarks.rb
49
- #
50
- # Ruby version: MRI 1.8.6 (2007-09-24 rev 111), platform: universal-darwin9.0
51
- #
52
- # 100 times: Open 98k XML document and count one type of leaf element (466 entries)
53
- #
54
- # Rehearsal -------------------------------------------
55
- # rexml 7.650000 0.040000 7.690000 ( 7.692767)
56
- # hpricot 2.100000 0.030000 2.130000 ( 2.133564)
57
- # libxml 0.390000 0.030000 0.420000 ( 0.419391)
58
- # --------------------------------- total: 10.240000sec
59
- #
60
- # user system total real
61
- # rexml 7.600000 0.010000 7.610000 ( 7.624436)
62
- # hpricot 2.040000 0.020000 2.060000 ( 2.056690)
63
- # libxml 0.380000 0.010000 0.390000 ( 0.389298)
64
- #
65
- # $ jruby ./xml_benchmarks.rb
66
- #
67
- # Ruby version: JRuby 1.8.6 (2008-03-20 rev 6255) [i386-jruby1.1RC3], platform: Java: version: 1.5.0_13
68
- #
69
- # 100 times: Open 98k XML document and count one type of leaf element (466 entries)
70
- #
71
- # Rehearsal ---------------------------------------------------------
72
- # rexml 14.063000 0.000000 14.063000 ( 14.063000)
73
- # hpricot 6.579000 0.000000 6.579000 ( 6.579000)
74
- # jdom_document_builder 2.211000 0.000000 2.211000 ( 2.211000)
75
- # ----------------------------------------------- total: 22.853000sec
76
- #
77
- # user system total real
78
- # rexml 12.944000 0.000000 12.944000 ( 12.944000)
79
- # hpricot 6.198000 0.000000 6.198000 ( 6.198000)
80
- # jdom_document_builder 1.450000 0.000000 1.450000 ( 1.451000)
81
- #
82
- # $ jruby -J-server ./xml_benchmarks.rb
83
- #
84
- # Ruby version: JRuby 1.8.6 (2008-03-20 rev 6255) [i386-jruby1.1RC3], platform: Java: version: 1.5.0_13
85
- #
86
- # 100 times: Open 98k XML document and count one type of leaf element (466 entries)
87
- #
88
- # Rehearsal ---------------------------------------------------------
89
- # rexml 13.212000 0.000000 13.212000 ( 13.212000)
90
- # hpricot 6.992000 0.000000 6.992000 ( 6.993000)
91
- # jdom_document_builder 1.873000 0.000000 1.873000 ( 1.873000)
92
- # ----------------------------------------------- total: 22.077000sec
93
- #
94
- # user system total real
95
- # rexml 9.611000 0.000000 9.611000 ( 9.609000)
96
- # hpricot 3.446000 0.000000 3.446000 ( 3.447000)
97
- # jdom_document_builder 0.616000 0.000000 0.616000 ( 0.617000)
98
- #
99
- #
100
- # *** Now using: Java 1.6.0_03 (Soylatte) ***
101
- #
102
- # $ jruby ./xml_benchmarks.rb
103
- #
104
- # Ruby version: JRuby 1.8.6 (2008-03-20 rev 6255) [i386-jruby1.1RC3], platform: Java: version: 1.6.0_03-p3
105
- #
106
- # 100 times: Open 98k XML document and count one type of leaf element (466 entries)
107
- #
108
- # Rehearsal ---------------------------------------------------------
109
- # rexml 9.976000 0.000000 9.976000 ( 9.976000)
110
- # hpricot 4.129000 0.000000 4.129000 ( 4.129000)
111
- # jdom_document_builder 2.287000 0.000000 2.287000 ( 2.287000)
112
- # ----------------------------------------------- total: 16.392000sec
113
- #
114
- # user system total real
115
- # rexml 6.357000 0.000000 6.357000 ( 6.356000)
116
- # hpricot 2.274000 0.000000 2.274000 ( 2.273000)
117
- # jdom_document_builder 0.363000 0.000000 0.363000 ( 0.363000)
118
- #
119
- # $ jruby -J-server ./xml_benchmarks.rb
120
- #
121
- # Ruby version: JRuby 1.8.6 (2008-03-20 rev 6255) [i386-jruby1.1RC3], platform: Java: version: 1.6.0_03-p3
122
- #
123
- # 100 times: Open 98k XML document and count one type of leaf element (466 entries)
124
- #
125
- # Rehearsal ---------------------------------------------------------
126
- # rexml 9.936000 0.000000 9.936000 ( 9.935000)
127
- # hpricot 4.074000 0.000000 4.074000 ( 4.074000)
128
- # jdom_document_builder 1.355000 0.000000 1.355000 ( 1.355000)
129
- # ----------------------------------------------- total: 15.365000sec
130
- #
131
- # user system total real
132
- # rexml 6.251000 0.000000 6.251000 ( 6.251000)
133
- # hpricot 2.273000 0.000000 2.273000 ( 2.272000)
134
- # jdom_document_builder 0.412000 0.000000 0.412000 ( 0.412000)
135
- #
136
-
137
- $:.unshift 'lib'
138
- $:.unshift 'ext/libxml'
139
-
140
- __DIR__ = File.dirname(__FILE__)
141
-
142
- require 'benchmark'
143
- require "rexml/document"
144
- require 'hpricot'
145
-
146
- if RUBY_PLATFORM =~ /java/
147
- include Java
148
- import javax.xml.parsers.DocumentBuilder
149
- import javax.xml.parsers.DocumentBuilderFactory
150
- @dbf = DocumentBuilderFactory.new_instance
151
- @ruby_info = "Ruby version: JRuby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE} rev #{RUBY_PATCHLEVEL}) [i386-jruby#{JRUBY_VERSION}]"
152
- @ruby_info << ", platform: Java, version #{java.lang.System.getProperty('java.version')}"
153
- else
154
- require 'libxml'
155
- @xml_parser = XML::Parser.new
156
- @ruby_info = "Ruby version: MRI #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}"# rev #{RUBY_PATCHLEVEL})"
157
- @ruby_info << ", platform: #{RUBY_PLATFORM}"
158
- end
159
-
160
- @bundle_with_466_sock_entries = File.read(File.join(__DIR__,"sock_entries.xml"))
161
-
162
- def rexml_count_socks
163
- doc = REXML::Document.new(@bundle_with_466_sock_entries).root
164
- socks = doc.elements.to_a('./sockEntries').length
165
- end
166
-
167
- unless RUBY_PLATFORM =~ /java/
168
- def libxml_count_socks
169
- @xml_parser.string = @bundle_with_466_sock_entries
170
- doc = @xml_parser.parse.root
171
- socks = doc.find('//sockEntries').length
172
- end
173
- end
174
-
175
- def hpricot_count_socks
176
- doc = Hpricot.XML(@bundle_with_466_sock_entries)
177
- socks = doc.search("//sockEntries").length
178
- end
179
-
180
- if RUBY_PLATFORM =~ /java/
181
- def jdom_document_builder_count_socks
182
- doc = @dbf.new_document_builder.parse("bundle_with_466_sock_entries.xml").get_document_element
183
- socks = doc.getElementsByTagName("sockEntries")
184
- socks.get_length
185
- end
186
- end
187
-
188
- n = 100
189
- test_iterations = ARGV.first.to_i
190
- test_iterations = 1 unless test_iterations > 1
191
- puts
192
- puts @ruby_info
193
- puts
194
- puts "#{n} times: Open 98k XML document and count one type of leaf element (466 entries)"
195
- puts
196
- print "running benchmark "
197
- if test_iterations == 1
198
- puts "once.\n\n"
199
- else
200
- puts "#{test_iterations} times.\n\n"
201
- end
202
- test_iterations.times do
203
- Benchmark.bmbm do |x|
204
- x.report("libxml") { n.times {libxml_count_socks} } unless RUBY_PLATFORM =~ /java/
205
- x.report("hpricot") { n.times {hpricot_count_socks} }
206
- x.report("rexml") { n.times {rexml_count_socks} }
207
- x.report("jdom_document_builder") { n.times {jdom_document_builder_count_socks} } if RUBY_PLATFORM =~ /java/
208
- end
209
- puts
210
- end
211
-
212
- #
213
- # jrexml doesn't appear to have any speedup in this test
214
- #
215
- # if RUBY_PLATFORM =~ /java/
216
- # require 'jrexml'
217
- # def rexml_with_jrexml_count_socks
218
- # doc = REXML::Document.new(@bundle_with_466_sock_entries).root
219
- # socks = doc.elements.to_a('./sockEntries').length
220
- # end
221
- #
222
- # puts "\nNow add in JREXML to see if it speeds up rexml\n"
223
- # Benchmark.bmbm do |x|
224
- # x.report("rexml+jrexml") { n.times {rexml_with_jrexml_count_socks} }
225
- # end
226
- # puts
227
- # end
Binary file
Binary file
Binary file
@@ -1,20 +0,0 @@
1
- 
2
- Microsoft Visual Studio Solution File, Format Version 9.00
3
- # Visual Studio 2005
4
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml_ruby", "libxml_ruby.vcproj", "{0B65CD1D-EEB9-41AE-93BB-75496E504152}"
5
- EndProject
6
- Global
7
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
8
- Debug|Win32 = Debug|Win32
9
- Release|Win32 = Release|Win32
10
- EndGlobalSection
11
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
12
- {0B65CD1D-EEB9-41AE-93BB-75496E504152}.Debug|Win32.ActiveCfg = Debug|Win32
13
- {0B65CD1D-EEB9-41AE-93BB-75496E504152}.Debug|Win32.Build.0 = Debug|Win32
14
- {0B65CD1D-EEB9-41AE-93BB-75496E504152}.Release|Win32.ActiveCfg = Release|Win32
15
- {0B65CD1D-EEB9-41AE-93BB-75496E504152}.Release|Win32.Build.0 = Release|Win32
16
- EndGlobalSection
17
- GlobalSection(SolutionProperties) = preSolution
18
- HideSolutionNode = FALSE
19
- EndGlobalSection
20
- EndGlobal
@@ -1,389 +0,0 @@
1
- <?xml version="1.0" encoding="Windows-1252"?>
2
- <VisualStudioProject
3
- ProjectType="Visual C++"
4
- Version="8.00"
5
- Name="libxml_ruby"
6
- ProjectGUID="{0B65CD1D-EEB9-41AE-93BB-75496E504152}"
7
- RootNamespace="libxml"
8
- Keyword="Win32Proj"
9
- >
10
- <Platforms>
11
- <Platform
12
- Name="Win32"
13
- />
14
- </Platforms>
15
- <ToolFiles>
16
- </ToolFiles>
17
- <Configurations>
18
- <Configuration
19
- Name="Debug|Win32"
20
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21
- IntermediateDirectory="$(ConfigurationName)"
22
- ConfigurationType="2"
23
- CharacterSet="1"
24
- >
25
- <Tool
26
- Name="VCPreBuildEventTool"
27
- />
28
- <Tool
29
- Name="VCCustomBuildTool"
30
- />
31
- <Tool
32
- Name="VCXMLDataGeneratorTool"
33
- />
34
- <Tool
35
- Name="VCWebServiceProxyGeneratorTool"
36
- />
37
- <Tool
38
- Name="VCMIDLTool"
39
- />
40
- <Tool
41
- Name="VCCLCompilerTool"
42
- Optimization="0"
43
- AdditionalIncludeDirectories="&quot;C:\Development\ruby\lib\ruby\1.8\i386-mswin32&quot;;&quot;C:\Development\msys\src\libxml2-2.6.32\include&quot;;&quot;C:\Development\msys\src\libiconv-1.12\include&quot;"
44
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBXML_EXPORTS"
45
- MinimalRebuild="true"
46
- BasicRuntimeChecks="3"
47
- RuntimeLibrary="3"
48
- UsePrecompiledHeader="0"
49
- WarningLevel="3"
50
- Detect64BitPortabilityProblems="true"
51
- DebugInformationFormat="4"
52
- />
53
- <Tool
54
- Name="VCManagedResourceCompilerTool"
55
- />
56
- <Tool
57
- Name="VCResourceCompilerTool"
58
- />
59
- <Tool
60
- Name="VCPreLinkEventTool"
61
- />
62
- <Tool
63
- Name="VCLinkerTool"
64
- AdditionalDependencies="msvcrt-ruby18.lib libxml2.lib"
65
- OutputFile="C:\Development\ruby\lib\ruby\gems\1.8\gems\libxml-ruby-0.8.0-x86-mswin32-60\lib\$(ProjectName).so"
66
- LinkIncremental="2"
67
- AdditionalLibraryDirectories="C:\Development\ruby\lib;&quot;C:\Development\msys\src\libxml2-2.6.32\win32\lib&quot;"
68
- GenerateDebugInformation="true"
69
- SubSystem="2"
70
- TargetMachine="1"
71
- />
72
- <Tool
73
- Name="VCALinkTool"
74
- />
75
- <Tool
76
- Name="VCManifestTool"
77
- />
78
- <Tool
79
- Name="VCXDCMakeTool"
80
- />
81
- <Tool
82
- Name="VCBscMakeTool"
83
- />
84
- <Tool
85
- Name="VCFxCopTool"
86
- />
87
- <Tool
88
- Name="VCAppVerifierTool"
89
- />
90
- <Tool
91
- Name="VCWebDeploymentTool"
92
- />
93
- <Tool
94
- Name="VCPostBuildEventTool"
95
- />
96
- </Configuration>
97
- <Configuration
98
- Name="Release|Win32"
99
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
100
- IntermediateDirectory="$(ConfigurationName)"
101
- ConfigurationType="2"
102
- CharacterSet="1"
103
- WholeProgramOptimization="1"
104
- >
105
- <Tool
106
- Name="VCPreBuildEventTool"
107
- />
108
- <Tool
109
- Name="VCCustomBuildTool"
110
- />
111
- <Tool
112
- Name="VCXMLDataGeneratorTool"
113
- />
114
- <Tool
115
- Name="VCWebServiceProxyGeneratorTool"
116
- />
117
- <Tool
118
- Name="VCMIDLTool"
119
- />
120
- <Tool
121
- Name="VCCLCompilerTool"
122
- AdditionalIncludeDirectories="&quot;C:\Development\ruby\lib\ruby\1.8\i386-mswin32&quot;;&quot;C:\Development\msys\src\libxml2-2.6.32\include&quot;;&quot;C:\Development\msys\src\libiconv-1.12\include&quot;"
123
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBXML_EXPORTS"
124
- RuntimeLibrary="2"
125
- UsePrecompiledHeader="0"
126
- WarningLevel="3"
127
- Detect64BitPortabilityProblems="true"
128
- DebugInformationFormat="3"
129
- />
130
- <Tool
131
- Name="VCManagedResourceCompilerTool"
132
- />
133
- <Tool
134
- Name="VCResourceCompilerTool"
135
- />
136
- <Tool
137
- Name="VCPreLinkEventTool"
138
- />
139
- <Tool
140
- Name="VCLinkerTool"
141
- AdditionalDependencies="msvcrt-ruby18.lib libxml2.lib"
142
- OutputFile="$(OutDir)\$(ProjectName).so"
143
- LinkIncremental="1"
144
- AdditionalLibraryDirectories="C:\Development\ruby\lib;&quot;C:\Development\msys\src\libxml2-2.6.32\win32\lib&quot;"
145
- GenerateDebugInformation="true"
146
- SubSystem="2"
147
- OptimizeReferences="2"
148
- EnableCOMDATFolding="2"
149
- TargetMachine="1"
150
- />
151
- <Tool
152
- Name="VCALinkTool"
153
- />
154
- <Tool
155
- Name="VCManifestTool"
156
- />
157
- <Tool
158
- Name="VCXDCMakeTool"
159
- />
160
- <Tool
161
- Name="VCBscMakeTool"
162
- />
163
- <Tool
164
- Name="VCFxCopTool"
165
- />
166
- <Tool
167
- Name="VCAppVerifierTool"
168
- />
169
- <Tool
170
- Name="VCWebDeploymentTool"
171
- />
172
- <Tool
173
- Name="VCPostBuildEventTool"
174
- />
175
- </Configuration>
176
- </Configurations>
177
- <References>
178
- </References>
179
- <Files>
180
- <Filter
181
- Name="Source Files"
182
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
183
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
184
- >
185
- <File
186
- RelativePath="..\ext\libxml\cbg.c"
187
- >
188
- </File>
189
- <File
190
- RelativePath="..\ext\libxml\libxml.c"
191
- >
192
- </File>
193
- <File
194
- RelativePath="..\ext\libxml\ruby_xml_attr.c"
195
- >
196
- </File>
197
- <File
198
- RelativePath="..\ext\libxml\ruby_xml_attributes.c"
199
- >
200
- </File>
201
- <File
202
- RelativePath="..\ext\libxml\ruby_xml_document.c"
203
- >
204
- </File>
205
- <File
206
- RelativePath="..\ext\libxml\ruby_xml_dtd.c"
207
- >
208
- </File>
209
- <File
210
- RelativePath="..\ext\libxml\ruby_xml_html_parser.c"
211
- >
212
- </File>
213
- <File
214
- RelativePath="..\ext\libxml\ruby_xml_input_cbg.c"
215
- >
216
- </File>
217
- <File
218
- RelativePath="..\ext\libxml\ruby_xml_node.c"
219
- >
220
- </File>
221
- <File
222
- RelativePath="..\ext\libxml\ruby_xml_node_set.c"
223
- >
224
- </File>
225
- <File
226
- RelativePath="..\ext\libxml\ruby_xml_ns.c"
227
- >
228
- </File>
229
- <File
230
- RelativePath="..\ext\libxml\ruby_xml_parser.c"
231
- >
232
- </File>
233
- <File
234
- RelativePath="..\ext\libxml\ruby_xml_parser_context.c"
235
- >
236
- </File>
237
- <File
238
- RelativePath="..\ext\libxml\ruby_xml_reader.c"
239
- >
240
- </File>
241
- <File
242
- RelativePath="..\ext\libxml\ruby_xml_sax_parser.c"
243
- >
244
- </File>
245
- <File
246
- RelativePath="..\ext\libxml\ruby_xml_schema.c"
247
- >
248
- </File>
249
- <File
250
- RelativePath="..\ext\libxml\ruby_xml_state.c"
251
- >
252
- </File>
253
- <File
254
- RelativePath="..\ext\libxml\ruby_xml_xinclude.c"
255
- >
256
- </File>
257
- <File
258
- RelativePath="..\ext\libxml\ruby_xml_xpath.c"
259
- >
260
- </File>
261
- <File
262
- RelativePath="..\ext\libxml\ruby_xml_xpath_context.c"
263
- >
264
- </File>
265
- <File
266
- RelativePath="..\ext\libxml\ruby_xml_xpath_object.c"
267
- >
268
- </File>
269
- <File
270
- RelativePath="..\ext\libxml\ruby_xml_xpointer.c"
271
- >
272
- </File>
273
- <File
274
- RelativePath="..\ext\libxml\ruby_xml_xpointer_context.c"
275
- >
276
- </File>
277
- </Filter>
278
- <Filter
279
- Name="Header Files"
280
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
281
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
282
- >
283
- <File
284
- RelativePath="..\ext\libxml\ruby_libxml.h"
285
- >
286
- </File>
287
- <File
288
- RelativePath="..\ext\libxml\ruby_xml_attr.h"
289
- >
290
- </File>
291
- <File
292
- RelativePath="..\ext\libxml\ruby_xml_attributes.h"
293
- >
294
- </File>
295
- <File
296
- RelativePath="..\ext\libxml\ruby_xml_document.h"
297
- >
298
- </File>
299
- <File
300
- RelativePath="..\ext\libxml\ruby_xml_dtd.h"
301
- >
302
- </File>
303
- <File
304
- RelativePath="..\ext\libxml\ruby_xml_html_parser.h"
305
- >
306
- </File>
307
- <File
308
- RelativePath="..\ext\libxml\ruby_xml_input_cbg.h"
309
- >
310
- </File>
311
- <File
312
- RelativePath="..\ext\libxml\ruby_xml_node.h"
313
- >
314
- </File>
315
- <File
316
- RelativePath="..\ext\libxml\ruby_xml_node_set.h"
317
- >
318
- </File>
319
- <File
320
- RelativePath="..\ext\libxml\ruby_xml_ns.h"
321
- >
322
- </File>
323
- <File
324
- RelativePath="..\ext\libxml\ruby_xml_parser.h"
325
- >
326
- </File>
327
- <File
328
- RelativePath="..\ext\libxml\ruby_xml_parser_context.h"
329
- >
330
- </File>
331
- <File
332
- RelativePath="..\ext\libxml\ruby_xml_reader.h"
333
- >
334
- </File>
335
- <File
336
- RelativePath="..\ext\libxml\ruby_xml_sax_parser.h"
337
- >
338
- </File>
339
- <File
340
- RelativePath="..\ext\libxml\ruby_xml_schema.h"
341
- >
342
- </File>
343
- <File
344
- RelativePath="..\ext\libxml\ruby_xml_state.h"
345
- >
346
- </File>
347
- <File
348
- RelativePath="..\ext\libxml\ruby_xml_xinclude.h"
349
- >
350
- </File>
351
- <File
352
- RelativePath="..\ext\libxml\ruby_xml_xpath.h"
353
- >
354
- </File>
355
- <File
356
- RelativePath="..\ext\libxml\ruby_xml_xpath_context.h"
357
- >
358
- </File>
359
- <File
360
- RelativePath="..\ext\libxml\ruby_xml_xpath_object.h"
361
- >
362
- </File>
363
- <File
364
- RelativePath="..\ext\libxml\ruby_xml_xpointer.h"
365
- >
366
- </File>
367
- <File
368
- RelativePath="..\ext\libxml\ruby_xml_xpointer_context.h"
369
- >
370
- </File>
371
- <File
372
- RelativePath="..\ext\libxml\version.h"
373
- >
374
- </File>
375
- </Filter>
376
- <Filter
377
- Name="Resource Files"
378
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
379
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
380
- >
381
- </Filter>
382
- <File
383
- RelativePath=".\ReadMe.txt"
384
- >
385
- </File>
386
- </Files>
387
- <Globals>
388
- </Globals>
389
- </VisualStudioProject>