libxml-ruby 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) 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/lib/libxml.rb +15 -4
  111. data/lib/xml.rb +14 -0
  112. data/lib/xml/libxml.rb +4 -1
  113. data/test/etc_doc_to_s.rb +1 -1
  114. data/test/ets_copy_bug.rb +1 -1
  115. data/test/ets_copy_bug3.rb +1 -1
  116. data/test/ets_doc_file.rb +1 -1
  117. data/test/ets_doc_to_s.rb +1 -1
  118. data/test/ets_node_gc.rb +1 -1
  119. data/test/ets_tsr.rb +1 -1
  120. data/test/model/shiporder.rnc +28 -0
  121. data/test/model/shiporder.rng +86 -0
  122. data/test/{tc_xml_attributes.rb → tc_attributes.rb} +1 -10
  123. data/test/{tc_xml_document.rb → tc_document.rb} +1 -1
  124. data/test/{tc_xml_document_write.rb → tc_document_write.rb} +1 -1
  125. data/test/{tc_xml_dtd.rb → tc_dtd.rb} +1 -1
  126. data/test/{tc_xml_html_parser.rb → tc_html_parser.rb} +1 -1
  127. data/test/{tc_xml_node.rb → tc_node.rb} +1 -1
  128. data/test/{tc_xml_node_attr.rb → tc_node_attr.rb} +1 -1
  129. data/test/{tc_xml_node_cdata.rb → tc_node_cdata.rb} +24 -5
  130. data/test/{tc_xml_node_comment.rb → tc_node_comment.rb} +1 -1
  131. data/test/{tc_xml_node_copy.rb → tc_node_copy.rb} +1 -1
  132. data/test/{tc_xml_node_edit.rb → tc_node_edit.rb} +1 -1
  133. data/test/{tc_xml_node_set.rb → tc_node_set.rb} +1 -1
  134. data/test/{tc_xml_node_set2.rb → tc_node_set2.rb} +1 -1
  135. data/test/{tc_xml_node_text.rb → tc_node_text.rb} +1 -1
  136. data/test/{tc_xml_node_xlink.rb → tc_node_xlink.rb} +2 -2
  137. data/test/{tc_xml_parser.rb → tc_parser.rb} +1 -1
  138. data/test/{tc_xml_parser_context.rb → tc_parser_context.rb} +1 -1
  139. data/test/{tc_xml_properties.rb → tc_properties.rb} +1 -7
  140. data/test/{tc_xml_reader.rb → tc_reader.rb} +1 -1
  141. data/test/tc_relaxng.rb +39 -0
  142. data/test/{tc_xml_sax_parser.rb → tc_sax_parser.rb} +1 -1
  143. data/test/{tc_xml_schema.rb → tc_schema.rb} +1 -1
  144. data/test/{tc_xml_traversal.rb → tc_traversal.rb} +1 -1
  145. data/test/{tc_xml_xinclude.rb → tc_xinclude.rb} +1 -1
  146. data/test/{tc_xml_xpath.rb → tc_xpath.rb} +1 -1
  147. data/test/{tc_xml_xpath_context.rb → tc_xpath_context.rb} +1 -1
  148. data/test/{tc_xml_xpointer.rb → tc_xpointer.rb} +1 -1
  149. data/test/test_suite.rb +26 -25
  150. metadata +100 -100
  151. data/benchmark/depixelate.rb +0 -632
  152. data/benchmark/hamlet.xml +0 -9055
  153. data/benchmark/sock_entries.xml +0 -507
  154. data/benchmark/throughput.rb +0 -39
  155. data/benchmark/xml_benchmarks.rb +0 -227
  156. data/mingw/libiconv-2.dll +0 -0
  157. data/mingw/libxml2-2.dll +0 -0
  158. data/mingw/libxml_ruby.so +0 -0
  159. data/test/gc.log +0 -0
  160. data/vc/libxml_ruby.sln +0 -20
  161. data/vc/libxml_ruby.vcproj +0 -389
@@ -78,6 +78,12 @@
78
78
 
79
79
  <div id="contextContent">
80
80
 
81
+ <div id="description">
82
+ <p>
83
+ Please see the LICENSE file for copyright and distribution information
84
+ </p>
85
+
86
+ </div>
81
87
 
82
88
 
83
89
  </div>
@@ -86,7 +92,7 @@
86
92
  <h3 class="section-bar">Methods</h3>
87
93
 
88
94
  <div class="name-list">
89
- <a href="#M000310">range</a>&nbsp;&nbsp;
95
+ <a href="#M000314">range</a>&nbsp;&nbsp;
90
96
  </div>
91
97
  </div>
92
98
 
@@ -115,11 +121,11 @@ Class <a href="XPointer/InvalidExpression.html" class="link">LibXML::XML::XPoint
115
121
  <div id="methods">
116
122
  <h3 class="section-bar">Public Class methods</h3>
117
123
 
118
- <div id="method-M000310" class="method-detail">
119
- <a name="M000310"></a>
124
+ <div id="method-M000314" class="method-detail">
125
+ <a name="M000314"></a>
120
126
 
121
127
  <div class="method-heading">
122
- <a href="#M000310" class="method-signature">
128
+ <a href="#M000314" class="method-signature">
123
129
  <span class="method-name">XML::XPointer.range(start_node, end_node) &rarr; xpath<br />
124
130
  </span>
125
131
  </a>
@@ -127,12 +133,12 @@ Class <a href="XPointer/InvalidExpression.html" class="link">LibXML::XML::XPoint
127
133
 
128
134
  <div class="method-description">
129
135
  <p>
130
- Create an xpath representing the range between the supplied start and end
131
- node.
136
+ Create an xpath representing the <a href="XPointer.html#M000314">range</a>
137
+ between the supplied start and end node.
132
138
  </p>
133
139
  <p><a class="source-toggle" href="#"
134
- onclick="toggleCode('M000310-source');return false;">[Source]</a></p>
135
- <div class="method-source-code" id="M000310-source">
140
+ onclick="toggleCode('M000314-source');return false;">[Source]</a></p>
141
+ <div class="method-source-code" id="M000314-source">
136
142
  <pre>
137
143
  /*
138
144
  * call-seq:
@@ -78,6 +78,12 @@
78
78
 
79
79
  <div id="contextContent">
80
80
 
81
+ <div id="description">
82
+ <p>
83
+ Please see the LICENSE file for copyright and distribution information
84
+ </p>
85
+
86
+ </div>
81
87
 
82
88
 
83
89
  </div>
@@ -78,6 +78,12 @@
78
78
 
79
79
  <div id="contextContent">
80
80
 
81
+ <div id="description">
82
+ <p>
83
+ Please see the LICENSE file for copyright and distribution information
84
+ </p>
85
+
86
+ </div>
81
87
 
82
88
 
83
89
  </div>
@@ -78,6 +78,19 @@
78
78
 
79
79
  <div id="contextContent">
80
80
 
81
+ <div id="description">
82
+ <p>
83
+ call-seq:
84
+ </p>
85
+ <pre>
86
+ XML::XPointer.range(start_node, end_node) -&gt; xpath
87
+ </pre>
88
+ <p>
89
+ Create an xpath representing the range between the supplied start and end
90
+ node.
91
+ </p>
92
+
93
+ </div>
81
94
 
82
95
 
83
96
  </div>
@@ -1 +1 @@
1
- Wed Jul 16 23:34:29 Mountain Daylight Time 2008
1
+ Mon, 21 Jul 2008 22:36:18 -0600
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Wed Jul 16 23:32:30 Mountain Daylight Time 2008</td>
59
+ <td>Mon Jul 21 20:01:08 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -73,6 +73,36 @@
73
73
  (See log/ChangeLog for more detailed changes derived directly from source
74
74
  control.)
75
75
  </p>
76
+ <h2>0.8.2 / 2008-07-21 Charlie Savage</h2>
77
+ <ul>
78
+ <li>To use <a href="../classes/LibXML.html">LibXML</a> you can either require
79
+ &#8216;xml&#8217; or require &#8216;libxml&#8217;. The differences is that
80
+ require &#8216;xml&#8217; mixes the <a
81
+ href="../classes/LibXML.html">LibXML</a> module into the global namespace,
82
+ thereby allowing you to write code such as document = XML::Document.new.
83
+ Note that this is different from 0.8.0 and 0.8.1 and may require updating
84
+ your code.
85
+
86
+ </li>
87
+ <li>Support RelaxNG validation (thanks to Morus Walter)
88
+
89
+ </li>
90
+ <li>Support passing IO objects to XmlReaders (thanks to Tom Hughes)
91
+
92
+ </li>
93
+ <li>Fix segmentation fault caused by adding an attribute to a CDATA node
94
+
95
+ </li>
96
+ <li>Moved node checking functions from C to Ruby
97
+
98
+ </li>
99
+ <li>Improved Windows support - libxml-ruby should now work out of the box.
100
+
101
+ </li>
102
+ <li>Improved Windows support - turned on libxml&#8216;s zlib and iconv support.
103
+
104
+ </li>
105
+ </ul>
76
106
  <h2>0.8.1 / 2008-07-09 Charlie Savage</h2>
77
107
  <ul>
78
108
  <li>Reimplmented Node#each_attr for backwards compatability
@@ -148,7 +178,7 @@ and attributes
148
178
  the same library that allocates memory must free it. Thus ALLOC calls must
149
179
  be matched to ruby_xfree calls, which they were not. In addition, in one
150
180
  case Ruby was allocating memory to be freed by libxml. On Windows,
151
- that&#8217;s a segmentation fault. On Linux it might fly, but still seems
181
+ that&#8216;s a segmentation fault. On Linux it might fly, but still seems
152
182
  like a bad idea.
153
183
 
154
184
  </li>
@@ -162,7 +192,7 @@ segmentation faults and fixes for various memory leaks
162
192
  <li>Cleaned up a number of compiler warnings
163
193
 
164
194
  </li>
165
- <li>Renamed libxml_so.so to libxml_ruby.so (same for xslt). That wasn&#8217;t
195
+ <li>Renamed libxml_so.so to libxml_ruby.so (same for xslt). That wasn&#8216;t
166
196
  actually my original intention, but um, it kind of sort of happened. It
167
197
  should not be noticeable from an end-user perspective.
168
198
 
@@ -171,7 +201,7 @@ should not be noticeable from an end-user perspective.
171
201
 
172
202
  </li>
173
203
  <li>Added rake files for packing gems. Note that I did this outside the
174
- existing rake tasks because I didn&#8217;t see how they were actually
204
+ existing rake tasks because I didn&#8216;t see how they were actually
175
205
  building the gems.
176
206
 
177
207
  </li>
@@ -185,14 +215,14 @@ Tracker and mailing list.
185
215
  </ul>
186
216
  <h3>2007-11-16 &quot;Dan Janowski&quot; &lt;danj at 3skel.com&gt;</h3>
187
217
  <ul>
188
- <li>Merged Dan&#8217;s MEM2 branch to trunk.
218
+ <li>Merged Dan&#8216;s MEM2 branch to trunk.
189
219
 
190
220
  </li>
191
221
  </ul>
192
222
  <h2>0.5.3 /</h2>
193
223
  <h3>2007-11-16 &quot;Dan Janowski&quot; &lt;danj at 3skel.com&gt;</h3>
194
224
  <ul>
195
- <li>Merged Dan&#8217;s MEM2 branch to trunk.
225
+ <li>Merged Dan&#8216;s MEM2 branch to trunk.
196
226
 
197
227
  </li>
198
228
  </ul>
@@ -227,8 +257,7 @@ Tracker and mailing list.
227
257
  <li>Integrated and tested community patches.
228
258
 
229
259
  </li>
230
- <li>Defined XML::Node (hash) equality in terms of <a
231
- href="../classes/XML.html">XML</a> representation.
260
+ <li>Defined XML::Node (hash) equality in terms of XML representation.
232
261
 
233
262
  </li>
234
263
  </ul>
@@ -327,8 +356,7 @@ setting the value of an already existing attribute.
327
356
  </ul>
328
357
  <h3>2004-03-17 &quot;Lukas Svoboda&quot; &lt;luks@fi.muni.cz&gt;</h3>
329
358
  <ul>
330
- <li>ruby_xml_node.c: ruby_xml_node_to_s now returns <a
331
- href="../classes/XML.html">XML</a> subtree dump.
359
+ <li>ruby_xml_node.c: ruby_xml_node_to_s now returns XML subtree dump.
332
360
 
333
361
  </li>
334
362
  </ul>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Mon Jul 07 00:26:58 Mountain Daylight Time 2008</td>
59
+ <td>Fri Jul 18 21:38:00 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jul 15 21:14:35 Mountain Daylight Time 2008</td>
59
+ <td>Mon Jul 21 20:37:43 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -72,9 +72,8 @@
72
72
  <h1><a href="../classes/LibXML.html">LibXML</a> Ruby</h1>
73
73
  <h2>Overview</h2>
74
74
  <p>
75
- The libxml gem provides Ruby language bindings for GNOME&#8217;s Libxml2 <a
76
- href="../classes/XML.html">XML</a> toolkit. It is free software, released
77
- under the MIT License.
75
+ The libxml gem provides Ruby language bindings for GNOME&#8216;s Libxml2
76
+ XML toolkit. It is free software, released under the MIT License.
78
77
  </p>
79
78
  <p>
80
79
  libxml-ruby provides several advantages over REXML:
@@ -84,12 +83,11 @@ libxml-ruby provides several advantages over REXML:
84
83
 
85
84
  </li>
86
85
  <li>Features - libxml provides a number of additional features over REXML,
87
- including <a href="../classes/XML.html">XML</a> Schema Validation, RelaxNg
88
- validation, xslt (see libxslt-ruby)
86
+ including XML Schema Validation, RelaxNg validation, xslt (see
87
+ libxslt-ruby)
89
88
 
90
89
  </li>
91
- <li>Conformance - libxml passes all 1800+ tests from the OASIS <a
92
- href="../classes/XML.html">XML</a> Tests Suite
90
+ <li>Conformance - libxml passes all 1800+ tests from the OASIS XML Tests Suite
93
91
 
94
92
  </li>
95
93
  </ul>
@@ -113,7 +111,7 @@ libraries to function properly:
113
111
  </li>
114
112
  </ul>
115
113
  <p>
116
- If you are running Linux or Unix you&#8217;ll need a C compiler so the
114
+ If you are running Linux or Unix you&#8216;ll need a C compiler so the
117
115
  extension can be compiled when it is installed. If you are running Windows,
118
116
  then install the Windows specific RubyGem which includes an already built
119
117
  extension.
@@ -128,21 +126,20 @@ The easiest way to install libxml-ruby is via Ruby Gems. To install:
128
126
  <p>
129
127
  If you are running Windows, make sure to install the Win32 RubyGem which
130
128
  includes an already built binary file. The binary is built against libxml2
131
- version 2.6.32 and iconv version 1.12. Both of these are also included as
129
+ version 2.6.32 and iconv version 1.11. Both of these are also included as
132
130
  pre-built binaries, and should be put either in the libxml/lib directory or
133
131
  on the Windows path.
134
132
  </p>
135
133
  <p>
136
- The Windows binaries are biult with MingW. The gem also includes a
137
- Microsoft VC++ 2005 solution. If you wish to run a debug version of
138
- libxml-ruby on Windows, then it is highly recommended you use VC++.
134
+ The Windows binaries are built with MingW and include libxml-ruby, libxml2
135
+ and iconv. The gem also includes a Microsoft VC++ 2008 solution. If you
136
+ wish to run a debug version of libxml-ruby on Windows, then it is highly
137
+ recommended you use VC++.
139
138
  </p>
140
139
  <h2>Functionality</h2>
141
140
  <p>
142
- libxml is a highly conformant <a href="../classes/XML.html">XML</a> parser,
143
- passing all 1800+ tests from the OASIS <a
144
- href="../classes/XML.html">XML</a> Tests Suite. In addition, it includes
145
- rich functionality such as:
141
+ libxml is a highly conformant XML parser, passing all 1800+ tests from the
142
+ OASIS XML Tests Suite. In addition, it includes rich functionality such as:
146
143
  </p>
147
144
  <ul>
148
145
  <li>SAX
@@ -150,6 +147,9 @@ rich functionality such as:
150
147
  </li>
151
148
  <li>DOM
152
149
 
150
+ </li>
151
+ <li>HTML Parsing
152
+
153
153
  </li>
154
154
  <li>XMLReader
155
155
 
@@ -160,10 +160,13 @@ rich functionality such as:
160
160
  <li>XPointer
161
161
 
162
162
  </li>
163
- <li><a href="../classes/XML.html">XML</a> Schema
163
+ <li>DTDs
164
+
165
+ </li>
166
+ <li>RelaxNG Schemas
164
167
 
165
168
  </li>
166
- <li>DTDs
169
+ <li>XML Schema
167
170
 
168
171
  </li>
169
172
  <li>XSLT (split into the libxslt-ruby bindings)
@@ -171,7 +174,7 @@ rich functionality such as:
171
174
  </li>
172
175
  </ul>
173
176
  <p>
174
- libxml-ruby provides impressive coverage of libxml&#8217;s functionality
177
+ libxml-ruby provides impressive coverage of libxml&#8216;s functionality
175
178
  through an easy-to-use C api.
176
179
  </p>
177
180
  <h2>Performance</h2>
@@ -204,14 +207,45 @@ href="https://svn.concord.org/svn/projects/trunk/common/ruby/xml_benchmarks">svn
204
207
  <h2>USAGE</h2>
205
208
  <p>
206
209
  For in-depth information about using libxml-ruby please refer to its online
207
- Rdoc documentation. Some simple examples are shown below.
210
+ Rdoc documentation.
211
+ </p>
212
+ <p>
213
+ All libxml classes are in the <a
214
+ href="../classes/LibXML/XML.html">LibXML::XML</a> module. The simplest way
215
+ to use libxml is to require &#8216;xml&#8217;. This will mixin the <a
216
+ href="../classes/LibXML.html">LibXML</a> module into the global namespace,
217
+ allowing you to write code like this:
218
+ </p>
219
+ <p>
220
+ require &#8216;xml&#8217; document = XML::Document.new
221
+ </p>
222
+ <p>
223
+ If you prefer not to add the <a href="../classes/LibXML.html">LibXML</a>
224
+ module to the global namepace, then write your code like this:
225
+ </p>
226
+ <p>
227
+ require &#8216;libxml&#8216;
228
+ </p>
229
+ <p>
230
+ class MyClass
231
+ </p>
232
+ <pre>
233
+ def some_method
234
+ document = LibXML::XML::Document.new
235
+ end
236
+ </pre>
237
+ <p>
238
+ end
239
+ </p>
240
+ <p>
241
+ Some simple examples are shown below.
208
242
  </p>
209
243
  <h3>READING</h3>
210
244
  <p>
211
245
  There are several ways to read xml documents.
212
246
  </p>
213
247
  <pre>
214
- require 'libxml'
248
+ require 'xml'
215
249
  doc = XML::Document.file('output.xml')
216
250
  root = doc.root
217
251
 
@@ -246,7 +280,7 @@ And your terminal should look like:
246
280
  To write a simple document:
247
281
  </p>
248
282
  <pre>
249
- require 'libxml'
283
+ require 'xml'
250
284
 
251
285
  doc = XML::Document.new()
252
286
  doc.root = XML::Node.new('root_node')
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Mon Jul 14 12:54:45 Mountain Daylight Time 2008</td>
59
+ <td>Fri Jul 18 21:38:00 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jul 15 11:37:10 Mountain Daylight Time 2008</td>
59
+ <td>Sat Jul 19 02:30:29 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jul 15 15:52:27 Mountain Daylight Time 2008</td>
59
+ <td>Mon Jul 21 16:41:10 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jul 15 15:35:37 Mountain Daylight Time 2008</td>
59
+ <td>Mon Jul 21 19:45:31 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jul 15 15:32:58 Mountain Daylight Time 2008</td>
59
+ <td>Mon Jul 21 19:45:00 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jul 15 15:35:37 Mountain Daylight Time 2008</td>
59
+ <td>Mon Jul 21 19:45:31 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Tue Jul 15 15:27:29 Mountain Daylight Time 2008</td>
59
+ <td>Sat Jul 19 02:30:29 -0600 2008</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>