libxml-ruby 0.8.1-x86-mswin32-60 → 0.8.2-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +21 -0
- data/RAKEFILE +213 -0
- data/README +32 -11
- data/doc/rdoc/classes/LibXML.html +4 -0
- data/doc/rdoc/classes/LibXML/XML.html +7 -0
- data/doc/rdoc/classes/LibXML/XML/Attr.html +187 -177
- data/doc/rdoc/classes/LibXML/XML/Attributes.html +62 -61
- data/doc/rdoc/classes/LibXML/XML/Document.html +318 -254
- data/doc/rdoc/classes/LibXML/XML/Dtd.html +62 -8
- data/doc/rdoc/classes/LibXML/XML/Error.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/HTMLParser.html +59 -41
- data/doc/rdoc/classes/LibXML/XML/InputCallbacks.html +12 -6
- data/doc/rdoc/classes/LibXML/XML/NS.html +65 -50
- data/doc/rdoc/classes/LibXML/XML/Node.html +671 -630
- data/doc/rdoc/classes/LibXML/XML/Node/FailedModify.html +12 -0
- data/doc/rdoc/classes/LibXML/XML/Node/Set.html +64 -60
- data/doc/rdoc/classes/LibXML/XML/Node/SetNamespace.html +12 -0
- data/doc/rdoc/classes/LibXML/XML/Node/UnknownType.html +12 -0
- data/doc/rdoc/classes/LibXML/XML/Parser.html +407 -383
- data/doc/rdoc/classes/LibXML/XML/Parser/Context.html +241 -219
- data/doc/rdoc/classes/LibXML/XML/Parser/ParseError.html +12 -0
- data/doc/rdoc/classes/LibXML/XML/Reader.html +421 -331
- data/doc/rdoc/classes/LibXML/XML/RelaxNG.html +237 -0
- data/doc/rdoc/classes/LibXML/XML/SaxParser.html +79 -60
- data/doc/rdoc/classes/LibXML/XML/Schema.html +109 -22
- data/doc/rdoc/classes/LibXML/XML/State.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XInclude.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XInclude/Error.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XPath.html +4 -48
- data/doc/rdoc/classes/LibXML/XML/XPath/Context.html +6 -5
- data/doc/rdoc/classes/LibXML/XML/XPath/InvalidPath.html +61 -0
- data/doc/rdoc/classes/LibXML/XML/XPath/Object.html +12 -8
- data/doc/rdoc/classes/LibXML/XML/XPointer.html +14 -8
- data/doc/rdoc/classes/LibXML/XML/XPointer/Context.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XPointer/Context/InvalidPath.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XPointer/InvalidExpression.html +13 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/CHANGES.html +38 -10
- data/doc/rdoc/files/LICENSE.html +1 -1
- data/doc/rdoc/files/README.html +57 -23
- data/doc/rdoc/files/VERSION.html +1 -1
- data/doc/rdoc/files/ext/libxml/cbg_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/libxml_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_attr_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_attributes_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_document_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_dtd_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_input_cbg_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_node_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_node_set_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_ns_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_context_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_reader_c.html +1 -1
- data/doc/rdoc/{classes/XML.html → files/ext/libxml/ruby_xml_relaxng_c.html} +16 -35
- data/doc/rdoc/files/ext/libxml/ruby_xml_sax_parser_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_schema_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_state_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xinclude_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_context_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_object_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_context_c.html +1 -1
- data/doc/rdoc/files/lib/libxml/attr_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/attributes_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/document_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/node_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/node_set_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/parser_options_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/parser_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/properties_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/tree_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml_rb.html +2 -2
- data/doc/rdoc/files/lib/xml/libxml_rb.html +12 -2
- data/doc/rdoc/files/lib/xml_rb.html +134 -0
- data/doc/rdoc/fr_class_index.html +1 -1
- data/doc/rdoc/fr_file_index.html +2 -0
- data/doc/rdoc/fr_method_index.html +349 -344
- data/ext/libxml/libxml.c +2 -1
- data/ext/libxml/ruby_libxml.h +1 -0
- data/ext/libxml/ruby_xml_attr.c +8 -2
- data/ext/libxml/ruby_xml_attributes.c +5 -5
- data/ext/libxml/ruby_xml_document.c +41 -2
- data/ext/libxml/ruby_xml_dtd.c +169 -169
- data/ext/libxml/ruby_xml_html_parser.c +449 -449
- data/ext/libxml/ruby_xml_input_cbg.c +165 -165
- data/ext/libxml/ruby_xml_node.c +1 -1
- data/ext/libxml/ruby_xml_node_set.c +172 -172
- data/ext/libxml/ruby_xml_ns.c +145 -145
- data/ext/libxml/ruby_xml_parser.c +1398 -1398
- data/ext/libxml/ruby_xml_parser_context.c +697 -697
- data/ext/libxml/ruby_xml_reader.c +44 -0
- data/ext/libxml/ruby_xml_reader.h +14 -14
- data/ext/libxml/ruby_xml_relaxng.c +97 -0
- data/ext/libxml/ruby_xml_relaxng.h +15 -0
- data/ext/libxml/ruby_xml_sax_parser.c +486 -486
- data/ext/libxml/ruby_xml_schema.c +1 -1
- data/ext/libxml/ruby_xml_state.c +4 -4
- data/ext/libxml/ruby_xml_xinclude.c +21 -21
- data/ext/libxml/ruby_xml_xpath.c +89 -89
- data/ext/libxml/ruby_xml_xpath_context.c +283 -283
- data/ext/libxml/ruby_xml_xpath_object.c +5 -5
- data/ext/libxml/ruby_xml_xpointer.c +104 -104
- data/ext/libxml/ruby_xml_xpointer_context.c +22 -22
- data/ext/libxml/version.h +2 -2
- data/ext/libxml/version.h.rej +17 -0
- data/ext/mingw/Rakefile +41 -0
- data/{mingw → lib}/libiconv-2.dll +0 -0
- data/lib/libxml.rb +15 -4
- data/lib/libxml2-2.dll +0 -0
- data/lib/libxml_ruby.dll.a +0 -0
- data/lib/libxml_ruby.so +0 -0
- data/lib/xml.rb +14 -0
- data/lib/xml/libxml.rb +4 -1
- data/test/etc_doc_to_s.rb +1 -1
- data/test/ets_copy_bug.rb +1 -1
- data/test/ets_copy_bug3.rb +1 -1
- data/test/ets_doc_file.rb +1 -1
- data/test/ets_doc_to_s.rb +1 -1
- data/test/ets_node_gc.rb +1 -1
- data/test/ets_tsr.rb +1 -1
- data/test/model/shiporder.rnc +28 -0
- data/test/model/shiporder.rng +86 -0
- data/test/{tc_xml_attributes.rb → tc_attributes.rb} +1 -10
- data/test/{tc_xml_document.rb → tc_document.rb} +1 -1
- data/test/{tc_xml_document_write.rb → tc_document_write.rb} +1 -1
- data/test/{tc_xml_dtd.rb → tc_dtd.rb} +1 -1
- data/test/{tc_xml_html_parser.rb → tc_html_parser.rb} +1 -1
- data/test/{tc_xml_node.rb → tc_node.rb} +1 -1
- data/test/{tc_xml_node_attr.rb → tc_node_attr.rb} +1 -1
- data/test/{tc_xml_node_cdata.rb → tc_node_cdata.rb} +24 -5
- data/test/{tc_xml_node_comment.rb → tc_node_comment.rb} +1 -1
- data/test/{tc_xml_node_copy.rb → tc_node_copy.rb} +1 -1
- data/test/{tc_xml_node_edit.rb → tc_node_edit.rb} +1 -1
- data/test/{tc_xml_node_set.rb → tc_node_set.rb} +1 -1
- data/test/{tc_xml_node_set2.rb → tc_node_set2.rb} +1 -1
- data/test/{tc_xml_node_text.rb → tc_node_text.rb} +1 -1
- data/test/{tc_xml_node_xlink.rb → tc_node_xlink.rb} +2 -2
- data/test/{tc_xml_parser.rb → tc_parser.rb} +1 -1
- data/test/{tc_xml_parser_context.rb → tc_parser_context.rb} +1 -1
- data/test/{tc_xml_properties.rb → tc_properties.rb} +1 -7
- data/test/{tc_xml_reader.rb → tc_reader.rb} +1 -1
- data/test/tc_relaxng.rb +39 -0
- data/test/{tc_xml_sax_parser.rb → tc_sax_parser.rb} +1 -1
- data/test/{tc_xml_schema.rb → tc_schema.rb} +1 -1
- data/test/{tc_xml_traversal.rb → tc_traversal.rb} +1 -1
- data/test/{tc_xml_xinclude.rb → tc_xinclude.rb} +1 -1
- data/test/{tc_xml_xpath.rb → tc_xpath.rb} +1 -1
- data/test/{tc_xml_xpath_context.rb → tc_xpath_context.rb} +1 -1
- data/test/{tc_xml_xpointer.rb → tc_xpointer.rb} +1 -1
- data/test/test_suite.rb +26 -25
- metadata +103 -100
- data/benchmark/depixelate.rb +0 -632
- data/benchmark/hamlet.xml +0 -9055
- data/benchmark/sock_entries.xml +0 -507
- data/benchmark/throughput.rb +0 -39
- data/benchmark/xml_benchmarks.rb +0 -227
- data/mingw/libxml2-2.dll +0 -0
- data/mingw/libxml_ruby.so +0 -0
- data/test/gc.log +0 -0
- data/vc/libxml_ruby.sln +0 -20
- data/vc/libxml_ruby.vcproj +0 -389
@@ -91,7 +91,7 @@ href="Attr.html">XML::Attr</a>).
|
|
91
91
|
Basic Usage:
|
92
92
|
</p>
|
93
93
|
<pre>
|
94
|
-
require '
|
94
|
+
require 'xml'
|
95
95
|
|
96
96
|
doc = XML::Document.new(<some_file>)
|
97
97
|
attributes = doc.root.attributes
|
@@ -123,15 +123,15 @@ To access a namespaced attribute:
|
|
123
123
|
<h3 class="section-bar">Methods</h3>
|
124
124
|
|
125
125
|
<div class="name-list">
|
126
|
-
<a href="#
|
127
|
-
<a href="#
|
128
|
-
<a href="#
|
129
|
-
<a href="#
|
130
|
-
<a href="#
|
131
|
-
<a href="#
|
132
|
-
<a href="#
|
133
|
-
<a href="#
|
134
|
-
<a href="#
|
126
|
+
<a href="#M000233">[]</a>
|
127
|
+
<a href="#M000234">[]=</a>
|
128
|
+
<a href="#M000235">each</a>
|
129
|
+
<a href="#M000237">first</a>
|
130
|
+
<a href="#M000231">get_attribute</a>
|
131
|
+
<a href="#M000232">get_attribute_ns</a>
|
132
|
+
<a href="#M000236">length</a>
|
133
|
+
<a href="#M000230">node</a>
|
134
|
+
<a href="#M000238">to_h</a>
|
135
135
|
</div>
|
136
136
|
</div>
|
137
137
|
|
@@ -160,11 +160,11 @@ To access a namespaced attribute:
|
|
160
160
|
<div id="methods">
|
161
161
|
<h3 class="section-bar">Public Instance methods</h3>
|
162
162
|
|
163
|
-
<div id="method-
|
164
|
-
<a name="
|
163
|
+
<div id="method-M000233" class="method-detail">
|
164
|
+
<a name="M000233"></a>
|
165
165
|
|
166
166
|
<div class="method-heading">
|
167
|
-
<a href="#
|
167
|
+
<a href="#M000233" class="method-signature">
|
168
168
|
<span class="method-name">attributes["name"] → String<br />
|
169
169
|
</span>
|
170
170
|
</a>
|
@@ -173,7 +173,7 @@ To access a namespaced attribute:
|
|
173
173
|
<div class="method-description">
|
174
174
|
<p>
|
175
175
|
Fetches an attribute value. If you want to access the underlying Attribute
|
176
|
-
itself use <a href="Attributes.html#
|
176
|
+
itself use <a href="Attributes.html#M000231">get_attribute</a>.
|
177
177
|
</p>
|
178
178
|
<p>
|
179
179
|
name: The name of the attribute, not including any namespaces.
|
@@ -182,8 +182,8 @@ name: The name of the attribute, not including any namespaces.
|
|
182
182
|
doc.root.attributes['att'] -> 'some value'
|
183
183
|
</pre>
|
184
184
|
<p><a class="source-toggle" href="#"
|
185
|
-
onclick="toggleCode('
|
186
|
-
<div class="method-source-code" id="
|
185
|
+
onclick="toggleCode('M000233-source');return false;">[Source]</a></p>
|
186
|
+
<div class="method-source-code" id="M000233-source">
|
187
187
|
<pre>
|
188
188
|
/*
|
189
189
|
* call-seq:
|
@@ -204,11 +204,11 @@ ruby_xml_attributes_attribute_get(VALUE self, VALUE name) {
|
|
204
204
|
</div>
|
205
205
|
</div>
|
206
206
|
|
207
|
-
<div id="method-
|
208
|
-
<a name="
|
207
|
+
<div id="method-M000234" class="method-detail">
|
208
|
+
<a name="M000234"></a>
|
209
209
|
|
210
210
|
<div class="method-heading">
|
211
|
-
<a href="#
|
211
|
+
<a href="#M000234" class="method-signature">
|
212
212
|
<span class="method-name">attributes["name"] = "value"<br />
|
213
213
|
</span>
|
214
214
|
</a>
|
@@ -217,7 +217,7 @@ ruby_xml_attributes_attribute_get(VALUE self, VALUE name) {
|
|
217
217
|
<div class="method-description">
|
218
218
|
<p>
|
219
219
|
Sets an attribute value. If you want to get the Attribute itself, use <a
|
220
|
-
href="Attributes.html#
|
220
|
+
href="Attributes.html#M000231">get_attribute</a>.
|
221
221
|
</p>
|
222
222
|
<p>
|
223
223
|
name: The name of the attribute, not including any namespaces. value: The
|
@@ -227,8 +227,8 @@ new value of the namespace.
|
|
227
227
|
doc.root.attributes['att'] = 'some value'
|
228
228
|
</pre>
|
229
229
|
<p><a class="source-toggle" href="#"
|
230
|
-
onclick="toggleCode('
|
231
|
-
<div class="method-source-code" id="
|
230
|
+
onclick="toggleCode('M000234-source');return false;">[Source]</a></p>
|
231
|
+
<div class="method-source-code" id="M000234-source">
|
232
232
|
<pre>
|
233
233
|
/*
|
234
234
|
* call-seq:
|
@@ -250,11 +250,11 @@ ruby_xml_attributes_attribute_set(VALUE self, VALUE name, VALUE value) {
|
|
250
250
|
</div>
|
251
251
|
</div>
|
252
252
|
|
253
|
-
<div id="method-
|
254
|
-
<a name="
|
253
|
+
<div id="method-M000235" class="method-detail">
|
254
|
+
<a name="M000235"></a>
|
255
255
|
|
256
256
|
<div class="method-heading">
|
257
|
-
<a href="#
|
257
|
+
<a href="#M000235" class="method-signature">
|
258
258
|
<span class="method-name">attributes.each {block} → XML::Attr<br />
|
259
259
|
</span>
|
260
260
|
</a>
|
@@ -262,14 +262,14 @@ ruby_xml_attributes_attribute_set(VALUE self, VALUE name, VALUE value) {
|
|
262
262
|
|
263
263
|
<div class="method-description">
|
264
264
|
<p>
|
265
|
-
Iterates over each attribute.
|
265
|
+
Iterates over <a href="Attributes.html#M000235">each</a> attribute.
|
266
266
|
</p>
|
267
267
|
<pre>
|
268
268
|
doc.root.attributes.each {|attribute| puts attribute.name}
|
269
269
|
</pre>
|
270
270
|
<p><a class="source-toggle" href="#"
|
271
|
-
onclick="toggleCode('
|
272
|
-
<div class="method-source-code" id="
|
271
|
+
onclick="toggleCode('M000235-source');return false;">[Source]</a></p>
|
272
|
+
<div class="method-source-code" id="M000235-source">
|
273
273
|
<pre>
|
274
274
|
/*
|
275
275
|
* call-seq:
|
@@ -287,11 +287,11 @@ ruby_xml_attributes_each(VALUE self) {
|
|
287
287
|
</div>
|
288
288
|
</div>
|
289
289
|
|
290
|
-
<div id="method-
|
291
|
-
<a name="
|
290
|
+
<div id="method-M000237" class="method-detail">
|
291
|
+
<a name="M000237"></a>
|
292
292
|
|
293
293
|
<div class="method-heading">
|
294
|
-
<a href="#
|
294
|
+
<a href="#M000237" class="method-signature">
|
295
295
|
<span class="method-name">attributes.first → XML::Attr<br />
|
296
296
|
</span>
|
297
297
|
</a>
|
@@ -299,14 +299,14 @@ ruby_xml_attributes_each(VALUE self) {
|
|
299
299
|
|
300
300
|
<div class="method-description">
|
301
301
|
<p>
|
302
|
-
Returns the first attribute.
|
302
|
+
Returns the <a href="Attributes.html#M000237">first</a> attribute.
|
303
303
|
</p>
|
304
304
|
<pre>
|
305
305
|
doc.root.attributes.first
|
306
306
|
</pre>
|
307
307
|
<p><a class="source-toggle" href="#"
|
308
|
-
onclick="toggleCode('
|
309
|
-
<div class="method-source-code" id="
|
308
|
+
onclick="toggleCode('M000237-source');return false;">[Source]</a></p>
|
309
|
+
<div class="method-source-code" id="M000237-source">
|
310
310
|
<pre>
|
311
311
|
/*
|
312
312
|
* call-seq:
|
@@ -324,11 +324,11 @@ ruby_xml_attributes_first(VALUE self) {
|
|
324
324
|
</div>
|
325
325
|
</div>
|
326
326
|
|
327
|
-
<div id="method-
|
328
|
-
<a name="
|
327
|
+
<div id="method-M000231" class="method-detail">
|
328
|
+
<a name="M000231"></a>
|
329
329
|
|
330
330
|
<div class="method-heading">
|
331
|
-
<a href="#
|
331
|
+
<a href="#M000231" class="method-signature">
|
332
332
|
<span class="method-name">attributes.get_attribute("name") → XML::Attr<br />
|
333
333
|
</span>
|
334
334
|
</a>
|
@@ -345,8 +345,8 @@ name: The name of the attribute, not including a namespace.
|
|
345
345
|
doc.root.attributes.get_attribute("foo")
|
346
346
|
</pre>
|
347
347
|
<p><a class="source-toggle" href="#"
|
348
|
-
onclick="toggleCode('
|
349
|
-
<div class="method-source-code" id="
|
348
|
+
onclick="toggleCode('M000231-source');return false;">[Source]</a></p>
|
349
|
+
<div class="method-source-code" id="M000231-source">
|
350
350
|
<pre>
|
351
351
|
/*
|
352
352
|
* call-seq:
|
@@ -366,11 +366,11 @@ ruby_xml_attributes_get_attribute(VALUE self, VALUE name) {
|
|
366
366
|
</div>
|
367
367
|
</div>
|
368
368
|
|
369
|
-
<div id="method-
|
370
|
-
<a name="
|
369
|
+
<div id="method-M000232" class="method-detail">
|
370
|
+
<a name="M000232"></a>
|
371
371
|
|
372
372
|
<div class="method-heading">
|
373
|
-
<a href="#
|
373
|
+
<a href="#M000232" class="method-signature">
|
374
374
|
<span class="method-name">attributes.get_attribute_ns("namespace", "name") → XML::Attr<br />
|
375
375
|
</span>
|
376
376
|
</a>
|
@@ -381,15 +381,15 @@ ruby_xml_attributes_get_attribute(VALUE self, VALUE name) {
|
|
381
381
|
Returns the specified attribute.
|
382
382
|
</p>
|
383
383
|
<p>
|
384
|
-
namespace: The URI of the attribute&#
|
384
|
+
namespace: The URI of the attribute‘s namespace. name: The name of
|
385
385
|
the attribute, not including a namespace.
|
386
386
|
</p>
|
387
387
|
<pre>
|
388
388
|
doc.root.attributes.get_attribute_ns('http://www.w3.org/1999/xlink', 'href')
|
389
389
|
</pre>
|
390
390
|
<p><a class="source-toggle" href="#"
|
391
|
-
onclick="toggleCode('
|
392
|
-
<div class="method-source-code" id="
|
391
|
+
onclick="toggleCode('M000232-source');return false;">[Source]</a></p>
|
392
|
+
<div class="method-source-code" id="M000232-source">
|
393
393
|
<pre>
|
394
394
|
/*
|
395
395
|
* call-seq:
|
@@ -410,11 +410,11 @@ ruby_xml_attributes_get_attribute_ns(VALUE self, VALUE namespace, VALUE name) {
|
|
410
410
|
</div>
|
411
411
|
</div>
|
412
412
|
|
413
|
-
<div id="method-
|
414
|
-
<a name="
|
413
|
+
<div id="method-M000236" class="method-detail">
|
414
|
+
<a name="M000236"></a>
|
415
415
|
|
416
416
|
<div class="method-heading">
|
417
|
-
<a href="#
|
417
|
+
<a href="#M000236" class="method-signature">
|
418
418
|
<span class="method-name">attributes.length → Integer<br />
|
419
419
|
</span>
|
420
420
|
</a>
|
@@ -428,8 +428,8 @@ Returns the number of attributes.
|
|
428
428
|
doc.root.attributes.length
|
429
429
|
</pre>
|
430
430
|
<p><a class="source-toggle" href="#"
|
431
|
-
onclick="toggleCode('
|
432
|
-
<div class="method-source-code" id="
|
431
|
+
onclick="toggleCode('M000236-source');return false;">[Source]</a></p>
|
432
|
+
<div class="method-source-code" id="M000236-source">
|
433
433
|
<pre>
|
434
434
|
/*
|
435
435
|
* call-seq:
|
@@ -447,11 +447,11 @@ ruby_xml_attributes_length(VALUE self) {
|
|
447
447
|
</div>
|
448
448
|
</div>
|
449
449
|
|
450
|
-
<div id="method-
|
451
|
-
<a name="
|
450
|
+
<div id="method-M000230" class="method-detail">
|
451
|
+
<a name="M000230"></a>
|
452
452
|
|
453
453
|
<div class="method-heading">
|
454
|
-
<a href="#
|
454
|
+
<a href="#M000230" class="method-signature">
|
455
455
|
<span class="method-name">attributes.node → XML::Node<br />
|
456
456
|
</span>
|
457
457
|
</a>
|
@@ -459,14 +459,15 @@ ruby_xml_attributes_length(VALUE self) {
|
|
459
459
|
|
460
460
|
<div class="method-description">
|
461
461
|
<p>
|
462
|
-
Return the node that owns this
|
462
|
+
Return the <a href="Attributes.html#M000230">node</a> that owns this
|
463
|
+
attributes list.
|
463
464
|
</p>
|
464
465
|
<pre>
|
465
466
|
doc.root.attributes.node == doc.root
|
466
467
|
</pre>
|
467
468
|
<p><a class="source-toggle" href="#"
|
468
|
-
onclick="toggleCode('
|
469
|
-
<div class="method-source-code" id="
|
469
|
+
onclick="toggleCode('M000230-source');return false;">[Source]</a></p>
|
470
|
+
<div class="method-source-code" id="M000230-source">
|
470
471
|
<pre>
|
471
472
|
/*
|
472
473
|
* call-seq:
|
@@ -484,19 +485,19 @@ ruby_xml_attributes_node_get(VALUE self) {
|
|
484
485
|
</div>
|
485
486
|
</div>
|
486
487
|
|
487
|
-
<div id="method-
|
488
|
-
<a name="
|
488
|
+
<div id="method-M000238" class="method-detail">
|
489
|
+
<a name="M000238"></a>
|
489
490
|
|
490
491
|
<div class="method-heading">
|
491
|
-
<a href="#
|
492
|
+
<a href="#M000238" class="method-signature">
|
492
493
|
<span class="method-name">to_h</span><span class="method-args">()</span>
|
493
494
|
</a>
|
494
495
|
</div>
|
495
496
|
|
496
497
|
<div class="method-description">
|
497
498
|
<p><a class="source-toggle" href="#"
|
498
|
-
onclick="toggleCode('
|
499
|
-
<div class="method-source-code" id="
|
499
|
+
onclick="toggleCode('M000238-source');return false;">[Source]</a></p>
|
500
|
+
<div class="method-source-code" id="M000238-source">
|
500
501
|
<pre>
|
501
502
|
<span class="ruby-comment cmt"># File lib/libxml/attributes.rb, line 7</span>
|
502
503
|
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h</span>
|
@@ -90,7 +90,7 @@ Reads or writes an <a href="../XML.html">XML</a> document:
|
|
90
90
|
Reading:
|
91
91
|
</p>
|
92
92
|
<pre>
|
93
|
-
require '
|
93
|
+
require 'xml'
|
94
94
|
|
95
95
|
doc = XML::Document.new()
|
96
96
|
doc.root = XML::Node.new('root_node')
|
@@ -115,42 +115,43 @@ Writing:
|
|
115
115
|
<h3 class="section-bar">Methods</h3>
|
116
116
|
|
117
117
|
<div class="name-list">
|
118
|
-
<a href="#
|
119
|
-
<a href="#
|
120
|
-
<a href="#
|
121
|
-
<a href="#
|
122
|
-
<a href="#
|
123
|
-
<a href="#
|
124
|
-
<a href="#
|
125
|
-
<a href="#
|
126
|
-
<a href="#
|
127
|
-
<a href="#
|
128
|
-
<a href="#
|
129
|
-
<a href="#
|
130
|
-
<a href="#
|
131
|
-
<a href="#
|
132
|
-
<a href="#
|
133
|
-
<a href="#
|
134
|
-
<a href="#
|
135
|
-
<a href="#
|
136
|
-
<a href="#
|
137
|
-
<a href="#
|
138
|
-
<a href="#
|
139
|
-
<a href="#
|
140
|
-
<a href="#
|
141
|
-
<a href="#
|
142
|
-
<a href="#
|
143
|
-
<a href="#
|
144
|
-
<a href="#
|
145
|
-
<a href="#
|
146
|
-
<a href="#
|
147
|
-
<a href="#
|
148
|
-
<a href="#
|
149
|
-
<a href="#
|
150
|
-
<a href="#
|
151
|
-
<a href="#
|
152
|
-
<a href="#
|
153
|
-
<a href="#
|
118
|
+
<a href="#M000326">child</a>
|
119
|
+
<a href="#M000327">child?</a>
|
120
|
+
<a href="#M000328">compression</a>
|
121
|
+
<a href="#M000329">compression=</a>
|
122
|
+
<a href="#M000330">compression?</a>
|
123
|
+
<a href="#M000332">debug_dump</a>
|
124
|
+
<a href="#M000333">debug_dump_head</a>
|
125
|
+
<a href="#M000334">debug_format_dump</a>
|
126
|
+
<a href="#M000331">dump</a>
|
127
|
+
<a href="#M000335">encoding</a>
|
128
|
+
<a href="#M000336">encoding=</a>
|
129
|
+
<a href="#M000324">file</a>
|
130
|
+
<a href="#M000337">filename</a>
|
131
|
+
<a href="#M000359">find</a>
|
132
|
+
<a href="#M000360">find_first</a>
|
133
|
+
<a href="#M000338">format_dump</a>
|
134
|
+
<a href="#M000339">last</a>
|
135
|
+
<a href="#M000340">last?</a>
|
136
|
+
<a href="#M000325">new</a>
|
137
|
+
<a href="#M000341">next</a>
|
138
|
+
<a href="#M000342">next?</a>
|
139
|
+
<a href="#M000343">parent</a>
|
140
|
+
<a href="#M000344">parent?</a>
|
141
|
+
<a href="#M000345">prev</a>
|
142
|
+
<a href="#M000346">prev?</a>
|
143
|
+
<a href="#M000358">reader</a>
|
144
|
+
<a href="#M000347">root</a>
|
145
|
+
<a href="#M000348">root=</a>
|
146
|
+
<a href="#M000349">save</a>
|
147
|
+
<a href="#M000350">standalone?</a>
|
148
|
+
<a href="#M000351">to_s</a>
|
149
|
+
<a href="#M000352">url</a>
|
150
|
+
<a href="#M000355">validate</a>
|
151
|
+
<a href="#M000357">validate_relaxng</a>
|
152
|
+
<a href="#M000356">validate_schema</a>
|
153
|
+
<a href="#M000353">version</a>
|
154
|
+
<a href="#M000354">xinclude</a>
|
154
155
|
</div>
|
155
156
|
</div>
|
156
157
|
|
@@ -172,11 +173,11 @@ Writing:
|
|
172
173
|
<div id="methods">
|
173
174
|
<h3 class="section-bar">Public Class methods</h3>
|
174
175
|
|
175
|
-
<div id="method-
|
176
|
-
<a name="
|
176
|
+
<div id="method-M000324" class="method-detail">
|
177
|
+
<a name="M000324"></a>
|
177
178
|
|
178
179
|
<div class="method-heading">
|
179
|
-
<a href="#
|
180
|
+
<a href="#M000324" class="method-signature">
|
180
181
|
<span class="method-name">XML::Document.file(filename) → document<br />
|
181
182
|
</span>
|
182
183
|
</a>
|
@@ -184,12 +185,13 @@ Writing:
|
|
184
185
|
|
185
186
|
<div class="method-description">
|
186
187
|
<p>
|
187
|
-
Create a
|
188
|
-
specified
|
188
|
+
Create a <a href="Document.html#M000325">new</a> <a
|
189
|
+
href="Document.html">XML::Document</a> by parsing the specified <a
|
190
|
+
href="Document.html#M000324">file</a>.
|
189
191
|
</p>
|
190
192
|
<p><a class="source-toggle" href="#"
|
191
|
-
onclick="toggleCode('
|
192
|
-
<div class="method-source-code" id="
|
193
|
+
onclick="toggleCode('M000324-source');return false;">[Source]</a></p>
|
194
|
+
<div class="method-source-code" id="M000324-source">
|
193
195
|
<pre>
|
194
196
|
/*
|
195
197
|
* call-seq:
|
@@ -206,11 +208,11 @@ ruby_xml_document_new_file(VALUE class, VALUE filename) {
|
|
206
208
|
</div>
|
207
209
|
</div>
|
208
210
|
|
209
|
-
<div id="method-
|
210
|
-
<a name="
|
211
|
+
<div id="method-M000325" class="method-detail">
|
212
|
+
<a name="M000325"></a>
|
211
213
|
|
212
214
|
<div class="method-heading">
|
213
|
-
<a href="#
|
215
|
+
<a href="#M000325" class="method-signature">
|
214
216
|
<span class="method-name">XML::Document.new(xml_version = 1.0) → document<br />
|
215
217
|
</span>
|
216
218
|
</a>
|
@@ -218,12 +220,13 @@ ruby_xml_document_new_file(VALUE class, VALUE filename) {
|
|
218
220
|
|
219
221
|
<div class="method-description">
|
220
222
|
<p>
|
221
|
-
Create a
|
222
|
-
|
223
|
+
Create a <a href="Document.html#M000325">new</a> <a
|
224
|
+
href="Document.html">XML::Document</a>, optionally specifying the <a
|
225
|
+
href="../XML.html">XML</a> <a href="Document.html#M000353">version</a>.
|
223
226
|
</p>
|
224
227
|
<p><a class="source-toggle" href="#"
|
225
|
-
onclick="toggleCode('
|
226
|
-
<div class="method-source-code" id="
|
228
|
+
onclick="toggleCode('M000325-source');return false;">[Source]</a></p>
|
229
|
+
<div class="method-source-code" id="M000325-source">
|
227
230
|
<pre>
|
228
231
|
/*
|
229
232
|
* call-seq:
|
@@ -242,11 +245,11 @@ ruby_xml_document_new(int argc, VALUE *argv, VALUE class) {
|
|
242
245
|
|
243
246
|
<h3 class="section-bar">Public Instance methods</h3>
|
244
247
|
|
245
|
-
<div id="method-
|
246
|
-
<a name="
|
248
|
+
<div id="method-M000326" class="method-detail">
|
249
|
+
<a name="M000326"></a>
|
247
250
|
|
248
251
|
<div class="method-heading">
|
249
|
-
<a href="#
|
252
|
+
<a href="#M000326" class="method-signature">
|
250
253
|
<span class="method-name">document.child → node<br />
|
251
254
|
</span>
|
252
255
|
</a>
|
@@ -254,11 +257,11 @@ ruby_xml_document_new(int argc, VALUE *argv, VALUE class) {
|
|
254
257
|
|
255
258
|
<div class="method-description">
|
256
259
|
<p>
|
257
|
-
Get this document&#
|
260
|
+
Get this document‘s <a href="Document.html#M000326">child</a> node.
|
258
261
|
</p>
|
259
262
|
<p><a class="source-toggle" href="#"
|
260
|
-
onclick="toggleCode('
|
261
|
-
<div class="method-source-code" id="
|
263
|
+
onclick="toggleCode('M000326-source');return false;">[Source]</a></p>
|
264
|
+
<div class="method-source-code" id="M000326-source">
|
262
265
|
<pre>
|
263
266
|
/*
|
264
267
|
* call-seq:
|
@@ -274,11 +277,11 @@ ruby_xml_document_child_get(VALUE self) {
|
|
274
277
|
</div>
|
275
278
|
</div>
|
276
279
|
|
277
|
-
<div id="method-
|
278
|
-
<a name="
|
280
|
+
<div id="method-M000327" class="method-detail">
|
281
|
+
<a name="M000327"></a>
|
279
282
|
|
280
283
|
<div class="method-heading">
|
281
|
-
<a href="#
|
284
|
+
<a href="#M000327" class="method-signature">
|
282
285
|
<span class="method-name">document.child? → (true|false)<br />
|
283
286
|
</span>
|
284
287
|
</a>
|
@@ -286,11 +289,12 @@ ruby_xml_document_child_get(VALUE self) {
|
|
286
289
|
|
287
290
|
<div class="method-description">
|
288
291
|
<p>
|
289
|
-
Determine whether this document has a
|
292
|
+
Determine whether this document has a <a
|
293
|
+
href="Document.html#M000326">child</a> node.
|
290
294
|
</p>
|
291
295
|
<p><a class="source-toggle" href="#"
|
292
|
-
onclick="toggleCode('
|
293
|
-
<div class="method-source-code" id="
|
296
|
+
onclick="toggleCode('M000327-source');return false;">[Source]</a></p>
|
297
|
+
<div class="method-source-code" id="M000327-source">
|
294
298
|
<pre>
|
295
299
|
/*
|
296
300
|
* call-seq:
|
@@ -306,11 +310,11 @@ ruby_xml_document_child_q(VALUE self) {
|
|
306
310
|
</div>
|
307
311
|
</div>
|
308
312
|
|
309
|
-
<div id="method-
|
310
|
-
<a name="
|
313
|
+
<div id="method-M000328" class="method-detail">
|
314
|
+
<a name="M000328"></a>
|
311
315
|
|
312
316
|
<div class="method-heading">
|
313
|
-
<a href="#
|
317
|
+
<a href="#M000328" class="method-signature">
|
314
318
|
<span class="method-name">document.compression → num<br />
|
315
319
|
</span>
|
316
320
|
</a>
|
@@ -318,11 +322,12 @@ ruby_xml_document_child_q(VALUE self) {
|
|
318
322
|
|
319
323
|
<div class="method-description">
|
320
324
|
<p>
|
321
|
-
Obtain this document&#
|
325
|
+
Obtain this document‘s <a
|
326
|
+
href="Document.html#M000328">compression</a> mode identifier.
|
322
327
|
</p>
|
323
328
|
<p><a class="source-toggle" href="#"
|
324
|
-
onclick="toggleCode('
|
325
|
-
<div class="method-source-code" id="
|
329
|
+
onclick="toggleCode('M000328-source');return false;">[Source]</a></p>
|
330
|
+
<div class="method-source-code" id="M000328-source">
|
326
331
|
<pre>
|
327
332
|
/*
|
328
333
|
* call-seq:
|
@@ -338,11 +343,11 @@ ruby_xml_document_compression_get(VALUE self) {
|
|
338
343
|
</div>
|
339
344
|
</div>
|
340
345
|
|
341
|
-
<div id="method-
|
342
|
-
<a name="
|
346
|
+
<div id="method-M000329" class="method-detail">
|
347
|
+
<a name="M000329"></a>
|
343
348
|
|
344
349
|
<div class="method-heading">
|
345
|
-
<a href="#
|
350
|
+
<a href="#M000329" class="method-signature">
|
346
351
|
<span class="method-name">document.compression = num<br />
|
347
352
|
</span>
|
348
353
|
</a>
|
@@ -350,11 +355,12 @@ ruby_xml_document_compression_get(VALUE self) {
|
|
350
355
|
|
351
356
|
<div class="method-description">
|
352
357
|
<p>
|
353
|
-
Set this document&#
|
358
|
+
Set this document‘s <a href="Document.html#M000328">compression</a>
|
359
|
+
mode.
|
354
360
|
</p>
|
355
361
|
<p><a class="source-toggle" href="#"
|
356
|
-
onclick="toggleCode('
|
357
|
-
<div class="method-source-code" id="
|
362
|
+
onclick="toggleCode('M000329-source');return false;">[Source]</a></p>
|
363
|
+
<div class="method-source-code" id="M000329-source">
|
358
364
|
<pre>
|
359
365
|
/*
|
360
366
|
* call-seq:
|
@@ -370,11 +376,11 @@ ruby_xml_document_compression_set(VALUE self, VALUE num) {
|
|
370
376
|
</div>
|
371
377
|
</div>
|
372
378
|
|
373
|
-
<div id="method-
|
374
|
-
<a name="
|
379
|
+
<div id="method-M000330" class="method-detail">
|
380
|
+
<a name="M000330"></a>
|
375
381
|
|
376
382
|
<div class="method-heading">
|
377
|
-
<a href="#
|
383
|
+
<a href="#M000330" class="method-signature">
|
378
384
|
<span class="method-name">document.compression? → (true|false)<br />
|
379
385
|
</span>
|
380
386
|
</a>
|
@@ -385,8 +391,8 @@ ruby_xml_document_compression_set(VALUE self, VALUE num) {
|
|
385
391
|
Determine whether this document is compressed.
|
386
392
|
</p>
|
387
393
|
<p><a class="source-toggle" href="#"
|
388
|
-
onclick="toggleCode('
|
389
|
-
<div class="method-source-code" id="
|
394
|
+
onclick="toggleCode('M000330-source');return false;">[Source]</a></p>
|
395
|
+
<div class="method-source-code" id="M000330-source">
|
390
396
|
<pre>
|
391
397
|
/*
|
392
398
|
* call-seq:
|
@@ -402,11 +408,11 @@ ruby_xml_document_compression_q(VALUE self) {
|
|
402
408
|
</div>
|
403
409
|
</div>
|
404
410
|
|
405
|
-
<div id="method-
|
406
|
-
<a name="
|
411
|
+
<div id="method-M000332" class="method-detail">
|
412
|
+
<a name="M000332"></a>
|
407
413
|
|
408
414
|
<div class="method-heading">
|
409
|
-
<a href="#
|
415
|
+
<a href="#M000332" class="method-signature">
|
410
416
|
<span class="method-name">document.debug_dump([stream]) → true<br />
|
411
417
|
</span>
|
412
418
|
</a>
|
@@ -414,11 +420,12 @@ ruby_xml_document_compression_q(VALUE self) {
|
|
414
420
|
|
415
421
|
<div class="method-description">
|
416
422
|
<p>
|
417
|
-
Debug version of
|
423
|
+
Debug <a href="Document.html#M000353">version</a> of <a
|
424
|
+
href="Document.html#M000331">dump</a>.
|
418
425
|
</p>
|
419
426
|
<p><a class="source-toggle" href="#"
|
420
|
-
onclick="toggleCode('
|
421
|
-
<div class="method-source-code" id="
|
427
|
+
onclick="toggleCode('M000332-source');return false;">[Source]</a></p>
|
428
|
+
<div class="method-source-code" id="M000332-source">
|
422
429
|
<pre>
|
423
430
|
/*
|
424
431
|
* call-seq:
|
@@ -434,11 +441,11 @@ ruby_xml_document_debug_dump(int argc, VALUE *argv, VALUE self) {
|
|
434
441
|
</div>
|
435
442
|
</div>
|
436
443
|
|
437
|
-
<div id="method-
|
438
|
-
<a name="
|
444
|
+
<div id="method-M000333" class="method-detail">
|
445
|
+
<a name="M000333"></a>
|
439
446
|
|
440
447
|
<div class="method-heading">
|
441
|
-
<a href="#
|
448
|
+
<a href="#M000333" class="method-signature">
|
442
449
|
<span class="method-name">document.debug_dump_head([stream]) → true<br />
|
443
450
|
</span>
|
444
451
|
</a>
|
@@ -446,12 +453,12 @@ ruby_xml_document_debug_dump(int argc, VALUE *argv, VALUE self) {
|
|
446
453
|
|
447
454
|
<div class="method-description">
|
448
455
|
<p>
|
449
|
-
Debug
|
450
|
-
stream is specified, stdout is used.
|
456
|
+
Debug-<a href="Document.html#M000331">dump</a> this document‘s header
|
457
|
+
to the specified IO stream. If no stream is specified, stdout is used.
|
451
458
|
</p>
|
452
459
|
<p><a class="source-toggle" href="#"
|
453
|
-
onclick="toggleCode('
|
454
|
-
<div class="method-source-code" id="
|
460
|
+
onclick="toggleCode('M000333-source');return false;">[Source]</a></p>
|
461
|
+
<div class="method-source-code" id="M000333-source">
|
455
462
|
<pre>
|
456
463
|
/*
|
457
464
|
* call-seq:
|
@@ -468,11 +475,11 @@ ruby_xml_document_debug_dump_head(int argc, VALUE *argv, VALUE self) {
|
|
468
475
|
</div>
|
469
476
|
</div>
|
470
477
|
|
471
|
-
<div id="method-
|
472
|
-
<a name="
|
478
|
+
<div id="method-M000334" class="method-detail">
|
479
|
+
<a name="M000334"></a>
|
473
480
|
|
474
481
|
<div class="method-heading">
|
475
|
-
<a href="#
|
482
|
+
<a href="#M000334" class="method-signature">
|
476
483
|
<span class="method-name">document.debug_format_dump([stream]) → true<br />
|
477
484
|
</span>
|
478
485
|
</a>
|
@@ -481,11 +488,11 @@ ruby_xml_document_debug_dump_head(int argc, VALUE *argv, VALUE self) {
|
|
481
488
|
<div class="method-description">
|
482
489
|
<p>
|
483
490
|
<b>Deprecated</b> in favour of <a
|
484
|
-
href="Document.html#
|
491
|
+
href="Document.html#M000338">format_dump</a>.
|
485
492
|
</p>
|
486
493
|
<p><a class="source-toggle" href="#"
|
487
|
-
onclick="toggleCode('
|
488
|
-
<div class="method-source-code" id="
|
494
|
+
onclick="toggleCode('M000334-source');return false;">[Source]</a></p>
|
495
|
+
<div class="method-source-code" id="M000334-source">
|
489
496
|
<pre>
|
490
497
|
/*
|
491
498
|
* call-seq:
|
@@ -501,11 +508,11 @@ ruby_xml_document_debug_format_dump(int argc, VALUE *argv, VALUE self) {
|
|
501
508
|
</div>
|
502
509
|
</div>
|
503
510
|
|
504
|
-
<div id="method-
|
505
|
-
<a name="
|
511
|
+
<div id="method-M000331" class="method-detail">
|
512
|
+
<a name="M000331"></a>
|
506
513
|
|
507
514
|
<div class="method-heading">
|
508
|
-
<a href="#
|
515
|
+
<a href="#M000331" class="method-signature">
|
509
516
|
<span class="method-name">document.dump([stream]) → true<br />
|
510
517
|
</span>
|
511
518
|
</a>
|
@@ -513,12 +520,12 @@ ruby_xml_document_debug_format_dump(int argc, VALUE *argv, VALUE self) {
|
|
513
520
|
|
514
521
|
<div class="method-description">
|
515
522
|
<p>
|
516
|
-
Dump this document&#
|
523
|
+
Dump this document‘s <a href="../XML.html">XML</a> to the specified
|
517
524
|
IO stream. If no stream is specified, stdout is used.
|
518
525
|
</p>
|
519
526
|
<p><a class="source-toggle" href="#"
|
520
|
-
onclick="toggleCode('
|
521
|
-
<div class="method-source-code" id="
|
527
|
+
onclick="toggleCode('M000331-source');return false;">[Source]</a></p>
|
528
|
+
<div class="method-source-code" id="M000331-source">
|
522
529
|
<pre>
|
523
530
|
/*
|
524
531
|
* call-seq:
|
@@ -535,11 +542,11 @@ ruby_xml_document_dump(int argc, VALUE *argv, VALUE self) {
|
|
535
542
|
</div>
|
536
543
|
</div>
|
537
544
|
|
538
|
-
<div id="method-
|
539
|
-
<a name="
|
545
|
+
<div id="method-M000335" class="method-detail">
|
546
|
+
<a name="M000335"></a>
|
540
547
|
|
541
548
|
<div class="method-heading">
|
542
|
-
<a href="#
|
549
|
+
<a href="#M000335" class="method-signature">
|
543
550
|
<span class="method-name">document.encoding → "encoding"<br />
|
544
551
|
</span>
|
545
552
|
</a>
|
@@ -547,11 +554,12 @@ ruby_xml_document_dump(int argc, VALUE *argv, VALUE self) {
|
|
547
554
|
|
548
555
|
<div class="method-description">
|
549
556
|
<p>
|
550
|
-
Obtain the encoding specified by this
|
557
|
+
Obtain the <a href="Document.html#M000335">encoding</a> specified by this
|
558
|
+
document.
|
551
559
|
</p>
|
552
560
|
<p><a class="source-toggle" href="#"
|
553
|
-
onclick="toggleCode('
|
554
|
-
<div class="method-source-code" id="
|
561
|
+
onclick="toggleCode('M000335-source');return false;">[Source]</a></p>
|
562
|
+
<div class="method-source-code" id="M000335-source">
|
555
563
|
<pre>
|
556
564
|
/*
|
557
565
|
* call-seq:
|
@@ -567,11 +575,11 @@ ruby_xml_document_encoding_get(VALUE self) {
|
|
567
575
|
</div>
|
568
576
|
</div>
|
569
577
|
|
570
|
-
<div id="method-
|
571
|
-
<a name="
|
578
|
+
<div id="method-M000336" class="method-detail">
|
579
|
+
<a name="M000336"></a>
|
572
580
|
|
573
581
|
<div class="method-heading">
|
574
|
-
<a href="#
|
582
|
+
<a href="#M000336" class="method-signature">
|
575
583
|
<span class="method-name">document.encoding = "encoding"<br />
|
576
584
|
</span>
|
577
585
|
</a>
|
@@ -579,11 +587,11 @@ ruby_xml_document_encoding_get(VALUE self) {
|
|
579
587
|
|
580
588
|
<div class="method-description">
|
581
589
|
<p>
|
582
|
-
Set the encoding for this document.
|
590
|
+
Set the <a href="Document.html#M000335">encoding</a> for this document.
|
583
591
|
</p>
|
584
592
|
<p><a class="source-toggle" href="#"
|
585
|
-
onclick="toggleCode('
|
586
|
-
<div class="method-source-code" id="
|
593
|
+
onclick="toggleCode('M000336-source');return false;">[Source]</a></p>
|
594
|
+
<div class="method-source-code" id="M000336-source">
|
587
595
|
<pre>
|
588
596
|
/*
|
589
597
|
* call-seq:
|
@@ -599,11 +607,11 @@ ruby_xml_document_encoding_set(VALUE self, VALUE encoding) {
|
|
599
607
|
</div>
|
600
608
|
</div>
|
601
609
|
|
602
|
-
<div id="method-
|
603
|
-
<a name="
|
610
|
+
<div id="method-M000337" class="method-detail">
|
611
|
+
<a name="M000337"></a>
|
604
612
|
|
605
613
|
<div class="method-heading">
|
606
|
-
<a href="#
|
614
|
+
<a href="#M000337" class="method-signature">
|
607
615
|
<span class="method-name">document.filename → "filename"<br />
|
608
616
|
</span>
|
609
617
|
</a>
|
@@ -611,11 +619,12 @@ ruby_xml_document_encoding_set(VALUE self, VALUE encoding) {
|
|
611
619
|
|
612
620
|
<div class="method-description">
|
613
621
|
<p>
|
614
|
-
Obtain the filename this document was
|
622
|
+
Obtain the <a href="Document.html#M000337">filename</a> this document was
|
623
|
+
read from.
|
615
624
|
</p>
|
616
625
|
<p><a class="source-toggle" href="#"
|
617
|
-
onclick="toggleCode('
|
618
|
-
<div class="method-source-code" id="
|
626
|
+
onclick="toggleCode('M000337-source');return false;">[Source]</a></p>
|
627
|
+
<div class="method-source-code" id="M000337-source">
|
619
628
|
<pre>
|
620
629
|
/*
|
621
630
|
* call-seq:
|
@@ -631,11 +640,11 @@ ruby_xml_document_filename_get(VALUE self) {
|
|
631
640
|
</div>
|
632
641
|
</div>
|
633
642
|
|
634
|
-
<div id="method-
|
635
|
-
<a name="
|
643
|
+
<div id="method-M000359" class="method-detail">
|
644
|
+
<a name="M000359"></a>
|
636
645
|
|
637
646
|
<div class="method-heading">
|
638
|
-
<a href="#
|
647
|
+
<a href="#M000359" class="method-signature">
|
639
648
|
<span class="method-name">find</span><span class="method-args">(xpath, nslist = nil)</span>
|
640
649
|
</a>
|
641
650
|
</div>
|
@@ -668,7 +677,7 @@ href="XPath.html">XML::XPath</a> for information).
|
|
668
677
|
<p>
|
669
678
|
IMPORTANT - The returned <a href="Node/Set.html">XML::Node::Set</a> must be
|
670
679
|
freed before its associated document. In a running Ruby program this will
|
671
|
-
happen automatically via Ruby&#
|
680
|
+
happen automatically via Ruby‘s mark and sweep garbage collector.
|
672
681
|
However, if the program exits, Ruby does not guarantee the order in which
|
673
682
|
objects are freed (see <a
|
674
683
|
href="http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/17700">blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/17700</a>).
|
@@ -686,8 +695,8 @@ which will cause a segmentation fault. To avoid this, use the following
|
|
686
695
|
GC.start
|
687
696
|
</pre>
|
688
697
|
<p><a class="source-toggle" href="#"
|
689
|
-
onclick="toggleCode('
|
690
|
-
<div class="method-source-code" id="
|
698
|
+
onclick="toggleCode('M000359-source');return false;">[Source]</a></p>
|
699
|
+
<div class="method-source-code" id="M000359-source">
|
691
700
|
<pre>
|
692
701
|
<span class="ruby-comment cmt"># File lib/libxml/document.rb, line 37</span>
|
693
702
|
37: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find</span>(<span class="ruby-identifier">xpath</span>, <span class="ruby-identifier">nslist</span> = <span class="ruby-keyword kw">nil</span>)
|
@@ -703,11 +712,11 @@ which will cause a segmentation fault. To avoid this, use the following
|
|
703
712
|
</div>
|
704
713
|
</div>
|
705
714
|
|
706
|
-
<div id="method-
|
707
|
-
<a name="
|
715
|
+
<div id="method-M000360" class="method-detail">
|
716
|
+
<a name="M000360"></a>
|
708
717
|
|
709
718
|
<div class="method-heading">
|
710
|
-
<a href="#
|
719
|
+
<a href="#M000360" class="method-signature">
|
711
720
|
<span class="method-name">find_first</span><span class="method-args">(xpath, nslist = nil)</span>
|
712
721
|
</a>
|
713
722
|
</div>
|
@@ -716,11 +725,11 @@ which will cause a segmentation fault. To avoid this, use the following
|
|
716
725
|
<p>
|
717
726
|
Return the first node matching the specified xpath expression. For more
|
718
727
|
information, please refer to the documentation for <a
|
719
|
-
href="Document.html#
|
728
|
+
href="Document.html#M000359">XML::Document#find</a>.
|
720
729
|
</p>
|
721
730
|
<p><a class="source-toggle" href="#"
|
722
|
-
onclick="toggleCode('
|
723
|
-
<div class="method-source-code" id="
|
731
|
+
onclick="toggleCode('M000360-source');return false;">[Source]</a></p>
|
732
|
+
<div class="method-source-code" id="M000360-source">
|
724
733
|
<pre>
|
725
734
|
<span class="ruby-comment cmt"># File lib/libxml/document.rb, line 49</span>
|
726
735
|
49: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_first</span>(<span class="ruby-identifier">xpath</span>, <span class="ruby-identifier">nslist</span> = <span class="ruby-keyword kw">nil</span>)
|
@@ -731,11 +740,11 @@ href="Document.html#M000354">XML::Document#find</a>.
|
|
731
740
|
</div>
|
732
741
|
</div>
|
733
742
|
|
734
|
-
<div id="method-
|
735
|
-
<a name="
|
743
|
+
<div id="method-M000338" class="method-detail">
|
744
|
+
<a name="M000338"></a>
|
736
745
|
|
737
746
|
<div class="method-heading">
|
738
|
-
<a href="#
|
747
|
+
<a href="#M000338" class="method-signature">
|
739
748
|
<span class="method-name">document.format_dump([stream], [spacing]) → true<br />
|
740
749
|
</span>
|
741
750
|
</a>
|
@@ -743,13 +752,13 @@ href="Document.html#M000354">XML::Document#find</a>.
|
|
743
752
|
|
744
753
|
<div class="method-description">
|
745
754
|
<p>
|
746
|
-
Dump this document&#
|
755
|
+
Dump this document‘s formatted <a href="../XML.html">XML</a> to the
|
747
756
|
specified IO stream. If no stream is specified, stdout is used. If spacing
|
748
757
|
is specified, it must be a boolean that determines whether spacing is used.
|
749
758
|
</p>
|
750
759
|
<p><a class="source-toggle" href="#"
|
751
|
-
onclick="toggleCode('
|
752
|
-
<div class="method-source-code" id="
|
760
|
+
onclick="toggleCode('M000338-source');return false;">[Source]</a></p>
|
761
|
+
<div class="method-source-code" id="M000338-source">
|
753
762
|
<pre>
|
754
763
|
/*
|
755
764
|
* call-seq:
|
@@ -768,11 +777,11 @@ ruby_xml_document_format_dump(int argc, VALUE *argv, VALUE self) {
|
|
768
777
|
</div>
|
769
778
|
</div>
|
770
779
|
|
771
|
-
<div id="method-
|
772
|
-
<a name="
|
780
|
+
<div id="method-M000339" class="method-detail">
|
781
|
+
<a name="M000339"></a>
|
773
782
|
|
774
783
|
<div class="method-heading">
|
775
|
-
<a href="#
|
784
|
+
<a href="#M000339" class="method-signature">
|
776
785
|
<span class="method-name">document.last → node<br />
|
777
786
|
</span>
|
778
787
|
</a>
|
@@ -780,11 +789,11 @@ ruby_xml_document_format_dump(int argc, VALUE *argv, VALUE self) {
|
|
780
789
|
|
781
790
|
<div class="method-description">
|
782
791
|
<p>
|
783
|
-
Obtain the last node.
|
792
|
+
Obtain the <a href="Document.html#M000339">last</a> node.
|
784
793
|
</p>
|
785
794
|
<p><a class="source-toggle" href="#"
|
786
|
-
onclick="toggleCode('
|
787
|
-
<div class="method-source-code" id="
|
795
|
+
onclick="toggleCode('M000339-source');return false;">[Source]</a></p>
|
796
|
+
<div class="method-source-code" id="M000339-source">
|
788
797
|
<pre>
|
789
798
|
/*
|
790
799
|
* call-seq:
|
@@ -800,11 +809,11 @@ ruby_xml_document_last_get(VALUE self) {
|
|
800
809
|
</div>
|
801
810
|
</div>
|
802
811
|
|
803
|
-
<div id="method-
|
804
|
-
<a name="
|
812
|
+
<div id="method-M000340" class="method-detail">
|
813
|
+
<a name="M000340"></a>
|
805
814
|
|
806
815
|
<div class="method-heading">
|
807
|
-
<a href="#
|
816
|
+
<a href="#M000340" class="method-signature">
|
808
817
|
<span class="method-name">document.last? → (true|false)<br />
|
809
818
|
</span>
|
810
819
|
</a>
|
@@ -812,11 +821,11 @@ ruby_xml_document_last_get(VALUE self) {
|
|
812
821
|
|
813
822
|
<div class="method-description">
|
814
823
|
<p>
|
815
|
-
Determine whether there is a last node.
|
824
|
+
Determine whether there is a <a href="Document.html#M000339">last</a> node.
|
816
825
|
</p>
|
817
826
|
<p><a class="source-toggle" href="#"
|
818
|
-
onclick="toggleCode('
|
819
|
-
<div class="method-source-code" id="
|
827
|
+
onclick="toggleCode('M000340-source');return false;">[Source]</a></p>
|
828
|
+
<div class="method-source-code" id="M000340-source">
|
820
829
|
<pre>
|
821
830
|
/*
|
822
831
|
* call-seq:
|
@@ -832,11 +841,11 @@ ruby_xml_document_last_q(VALUE self) {
|
|
832
841
|
</div>
|
833
842
|
</div>
|
834
843
|
|
835
|
-
<div id="method-
|
836
|
-
<a name="
|
844
|
+
<div id="method-M000341" class="method-detail">
|
845
|
+
<a name="M000341"></a>
|
837
846
|
|
838
847
|
<div class="method-heading">
|
839
|
-
<a href="#
|
848
|
+
<a href="#M000341" class="method-signature">
|
840
849
|
<span class="method-name">document.next → node<br />
|
841
850
|
</span>
|
842
851
|
</a>
|
@@ -844,11 +853,11 @@ ruby_xml_document_last_q(VALUE self) {
|
|
844
853
|
|
845
854
|
<div class="method-description">
|
846
855
|
<p>
|
847
|
-
Obtain the next node.
|
856
|
+
Obtain the <a href="Document.html#M000341">next</a> node.
|
848
857
|
</p>
|
849
858
|
<p><a class="source-toggle" href="#"
|
850
|
-
onclick="toggleCode('
|
851
|
-
<div class="method-source-code" id="
|
859
|
+
onclick="toggleCode('M000341-source');return false;">[Source]</a></p>
|
860
|
+
<div class="method-source-code" id="M000341-source">
|
852
861
|
<pre>
|
853
862
|
/*
|
854
863
|
* call-seq:
|
@@ -864,11 +873,11 @@ ruby_xml_document_next_get(VALUE self) {
|
|
864
873
|
</div>
|
865
874
|
</div>
|
866
875
|
|
867
|
-
<div id="method-
|
868
|
-
<a name="
|
876
|
+
<div id="method-M000342" class="method-detail">
|
877
|
+
<a name="M000342"></a>
|
869
878
|
|
870
879
|
<div class="method-heading">
|
871
|
-
<a href="#
|
880
|
+
<a href="#M000342" class="method-signature">
|
872
881
|
<span class="method-name">document.next? → (true|false)<br />
|
873
882
|
</span>
|
874
883
|
</a>
|
@@ -876,11 +885,11 @@ ruby_xml_document_next_get(VALUE self) {
|
|
876
885
|
|
877
886
|
<div class="method-description">
|
878
887
|
<p>
|
879
|
-
Determine whether there is a next node.
|
888
|
+
Determine whether there is a <a href="Document.html#M000341">next</a> node.
|
880
889
|
</p>
|
881
890
|
<p><a class="source-toggle" href="#"
|
882
|
-
onclick="toggleCode('
|
883
|
-
<div class="method-source-code" id="
|
891
|
+
onclick="toggleCode('M000342-source');return false;">[Source]</a></p>
|
892
|
+
<div class="method-source-code" id="M000342-source">
|
884
893
|
<pre>
|
885
894
|
/*
|
886
895
|
* call-seq:
|
@@ -896,11 +905,11 @@ ruby_xml_document_next_q(VALUE self) {
|
|
896
905
|
</div>
|
897
906
|
</div>
|
898
907
|
|
899
|
-
<div id="method-
|
900
|
-
<a name="
|
908
|
+
<div id="method-M000343" class="method-detail">
|
909
|
+
<a name="M000343"></a>
|
901
910
|
|
902
911
|
<div class="method-heading">
|
903
|
-
<a href="#
|
912
|
+
<a href="#M000343" class="method-signature">
|
904
913
|
<span class="method-name">document.parent → node<br />
|
905
914
|
</span>
|
906
915
|
</a>
|
@@ -908,11 +917,11 @@ ruby_xml_document_next_q(VALUE self) {
|
|
908
917
|
|
909
918
|
<div class="method-description">
|
910
919
|
<p>
|
911
|
-
Obtain the parent node.
|
920
|
+
Obtain the <a href="Document.html#M000343">parent</a> node.
|
912
921
|
</p>
|
913
922
|
<p><a class="source-toggle" href="#"
|
914
|
-
onclick="toggleCode('
|
915
|
-
<div class="method-source-code" id="
|
923
|
+
onclick="toggleCode('M000343-source');return false;">[Source]</a></p>
|
924
|
+
<div class="method-source-code" id="M000343-source">
|
916
925
|
<pre>
|
917
926
|
/*
|
918
927
|
* call-seq:
|
@@ -928,11 +937,11 @@ ruby_xml_document_parent_get(VALUE self) {
|
|
928
937
|
</div>
|
929
938
|
</div>
|
930
939
|
|
931
|
-
<div id="method-
|
932
|
-
<a name="
|
940
|
+
<div id="method-M000344" class="method-detail">
|
941
|
+
<a name="M000344"></a>
|
933
942
|
|
934
943
|
<div class="method-heading">
|
935
|
-
<a href="#
|
944
|
+
<a href="#M000344" class="method-signature">
|
936
945
|
<span class="method-name">document.parent? → (true|false)<br />
|
937
946
|
</span>
|
938
947
|
</a>
|
@@ -940,11 +949,12 @@ ruby_xml_document_parent_get(VALUE self) {
|
|
940
949
|
|
941
950
|
<div class="method-description">
|
942
951
|
<p>
|
943
|
-
Determine whether there is a
|
952
|
+
Determine whether there is a <a href="Document.html#M000343">parent</a>
|
953
|
+
node.
|
944
954
|
</p>
|
945
955
|
<p><a class="source-toggle" href="#"
|
946
|
-
onclick="toggleCode('
|
947
|
-
<div class="method-source-code" id="
|
956
|
+
onclick="toggleCode('M000344-source');return false;">[Source]</a></p>
|
957
|
+
<div class="method-source-code" id="M000344-source">
|
948
958
|
<pre>
|
949
959
|
/*
|
950
960
|
* call-seq:
|
@@ -960,11 +970,11 @@ ruby_xml_document_parent_q(VALUE self) {
|
|
960
970
|
</div>
|
961
971
|
</div>
|
962
972
|
|
963
|
-
<div id="method-
|
964
|
-
<a name="
|
973
|
+
<div id="method-M000345" class="method-detail">
|
974
|
+
<a name="M000345"></a>
|
965
975
|
|
966
976
|
<div class="method-heading">
|
967
|
-
<a href="#
|
977
|
+
<a href="#M000345" class="method-signature">
|
968
978
|
<span class="method-name">document.prev → node<br />
|
969
979
|
</span>
|
970
980
|
</a>
|
@@ -975,8 +985,8 @@ ruby_xml_document_parent_q(VALUE self) {
|
|
975
985
|
Obtain the previous node.
|
976
986
|
</p>
|
977
987
|
<p><a class="source-toggle" href="#"
|
978
|
-
onclick="toggleCode('
|
979
|
-
<div class="method-source-code" id="
|
988
|
+
onclick="toggleCode('M000345-source');return false;">[Source]</a></p>
|
989
|
+
<div class="method-source-code" id="M000345-source">
|
980
990
|
<pre>
|
981
991
|
/*
|
982
992
|
* call-seq:
|
@@ -992,11 +1002,11 @@ ruby_xml_document_prev_get(VALUE self) {
|
|
992
1002
|
</div>
|
993
1003
|
</div>
|
994
1004
|
|
995
|
-
<div id="method-
|
996
|
-
<a name="
|
1005
|
+
<div id="method-M000346" class="method-detail">
|
1006
|
+
<a name="M000346"></a>
|
997
1007
|
|
998
1008
|
<div class="method-heading">
|
999
|
-
<a href="#
|
1009
|
+
<a href="#M000346" class="method-signature">
|
1000
1010
|
<span class="method-name">document.prev? → (true|false)<br />
|
1001
1011
|
</span>
|
1002
1012
|
</a>
|
@@ -1007,8 +1017,8 @@ ruby_xml_document_prev_get(VALUE self) {
|
|
1007
1017
|
Determine whether there is a previous node.
|
1008
1018
|
</p>
|
1009
1019
|
<p><a class="source-toggle" href="#"
|
1010
|
-
onclick="toggleCode('
|
1011
|
-
<div class="method-source-code" id="
|
1020
|
+
onclick="toggleCode('M000346-source');return false;">[Source]</a></p>
|
1021
|
+
<div class="method-source-code" id="M000346-source">
|
1012
1022
|
<pre>
|
1013
1023
|
/*
|
1014
1024
|
* call-seq:
|
@@ -1024,11 +1034,11 @@ ruby_xml_document_prev_q(VALUE self) {
|
|
1024
1034
|
</div>
|
1025
1035
|
</div>
|
1026
1036
|
|
1027
|
-
<div id="method-
|
1028
|
-
<a name="
|
1037
|
+
<div id="method-M000358" class="method-detail">
|
1038
|
+
<a name="M000358"></a>
|
1029
1039
|
|
1030
1040
|
<div class="method-heading">
|
1031
|
-
<a href="#
|
1041
|
+
<a href="#M000358" class="method-signature">
|
1032
1042
|
<span class="method-name">document.reader → reader<br />
|
1033
1043
|
</span>
|
1034
1044
|
</a>
|
@@ -1037,11 +1047,11 @@ ruby_xml_document_prev_q(VALUE self) {
|
|
1037
1047
|
<div class="method-description">
|
1038
1048
|
<p>
|
1039
1049
|
Create a <a href="Reader.html">XML::Reader</a> from the document. This is a
|
1040
|
-
shortcut to <a href="Reader.html#
|
1050
|
+
shortcut to <a href="Reader.html#M000268">XML::Reader.walker</a>().
|
1041
1051
|
</p>
|
1042
1052
|
<p><a class="source-toggle" href="#"
|
1043
|
-
onclick="toggleCode('
|
1044
|
-
<div class="method-source-code" id="
|
1053
|
+
onclick="toggleCode('M000358-source');return false;">[Source]</a></p>
|
1054
|
+
<div class="method-source-code" id="M000358-source">
|
1045
1055
|
<pre>
|
1046
1056
|
/*
|
1047
1057
|
* call-seq:
|
@@ -1060,11 +1070,11 @@ ruby_xml_document_reader(VALUE self)
|
|
1060
1070
|
</div>
|
1061
1071
|
</div>
|
1062
1072
|
|
1063
|
-
<div id="method-
|
1064
|
-
<a name="
|
1073
|
+
<div id="method-M000347" class="method-detail">
|
1074
|
+
<a name="M000347"></a>
|
1065
1075
|
|
1066
1076
|
<div class="method-heading">
|
1067
|
-
<a href="#
|
1077
|
+
<a href="#M000347" class="method-signature">
|
1068
1078
|
<span class="method-name">document.root → node<br />
|
1069
1079
|
</span>
|
1070
1080
|
</a>
|
@@ -1072,11 +1082,11 @@ ruby_xml_document_reader(VALUE self)
|
|
1072
1082
|
|
1073
1083
|
<div class="method-description">
|
1074
1084
|
<p>
|
1075
|
-
Obtain the root node.
|
1085
|
+
Obtain the <a href="Document.html#M000347">root</a> node.
|
1076
1086
|
</p>
|
1077
1087
|
<p><a class="source-toggle" href="#"
|
1078
|
-
onclick="toggleCode('
|
1079
|
-
<div class="method-source-code" id="
|
1088
|
+
onclick="toggleCode('M000347-source');return false;">[Source]</a></p>
|
1089
|
+
<div class="method-source-code" id="M000347-source">
|
1080
1090
|
<pre>
|
1081
1091
|
/*
|
1082
1092
|
* call-seq:
|
@@ -1092,11 +1102,11 @@ ruby_xml_document_root_get(VALUE self) {
|
|
1092
1102
|
</div>
|
1093
1103
|
</div>
|
1094
1104
|
|
1095
|
-
<div id="method-
|
1096
|
-
<a name="
|
1105
|
+
<div id="method-M000348" class="method-detail">
|
1106
|
+
<a name="M000348"></a>
|
1097
1107
|
|
1098
1108
|
<div class="method-heading">
|
1099
|
-
<a href="#
|
1109
|
+
<a href="#M000348" class="method-signature">
|
1100
1110
|
<span class="method-name">document.root = node<br />
|
1101
1111
|
</span>
|
1102
1112
|
</a>
|
@@ -1104,11 +1114,11 @@ ruby_xml_document_root_get(VALUE self) {
|
|
1104
1114
|
|
1105
1115
|
<div class="method-description">
|
1106
1116
|
<p>
|
1107
|
-
Set the root node.
|
1117
|
+
Set the <a href="Document.html#M000347">root</a> node.
|
1108
1118
|
</p>
|
1109
1119
|
<p><a class="source-toggle" href="#"
|
1110
|
-
onclick="toggleCode('
|
1111
|
-
<div class="method-source-code" id="
|
1120
|
+
onclick="toggleCode('M000348-source');return false;">[Source]</a></p>
|
1121
|
+
<div class="method-source-code" id="M000348-source">
|
1112
1122
|
<pre>
|
1113
1123
|
/*
|
1114
1124
|
* call-seq:
|
@@ -1124,11 +1134,11 @@ ruby_xml_document_root_set(VALUE self, VALUE node) {
|
|
1124
1134
|
</div>
|
1125
1135
|
</div>
|
1126
1136
|
|
1127
|
-
<div id="method-
|
1128
|
-
<a name="
|
1137
|
+
<div id="method-M000349" class="method-detail">
|
1138
|
+
<a name="M000349"></a>
|
1129
1139
|
|
1130
1140
|
<div class="method-heading">
|
1131
|
-
<a href="#
|
1141
|
+
<a href="#M000349" class="method-signature">
|
1132
1142
|
<span class="method-name">document.save(filename, format = false) → int<br />
|
1133
1143
|
</span>
|
1134
1144
|
</a>
|
@@ -1136,7 +1146,8 @@ ruby_xml_document_root_set(VALUE self, VALUE node) {
|
|
1136
1146
|
|
1137
1147
|
<div class="method-description">
|
1138
1148
|
<p>
|
1139
|
-
Save this document to the file given by
|
1149
|
+
Save this document to the <a href="Document.html#M000324">file</a> given by
|
1150
|
+
<a href="Document.html#M000337">filename</a>, optionally formatting the
|
1140
1151
|
output.
|
1141
1152
|
</p>
|
1142
1153
|
<p>
|
@@ -1148,8 +1159,8 @@ Parameters:
|
|
1148
1159
|
returns: The number of bytes written or -1 in case of error.
|
1149
1160
|
</pre>
|
1150
1161
|
<p><a class="source-toggle" href="#"
|
1151
|
-
onclick="toggleCode('
|
1152
|
-
<div class="method-source-code" id="
|
1162
|
+
onclick="toggleCode('M000349-source');return false;">[Source]</a></p>
|
1163
|
+
<div class="method-source-code" id="M000349-source">
|
1153
1164
|
<pre>
|
1154
1165
|
/*
|
1155
1166
|
* call-seq:
|
@@ -1171,11 +1182,11 @@ ruby_xml_document_save(int argc, VALUE *argv, VALUE self) {
|
|
1171
1182
|
</div>
|
1172
1183
|
</div>
|
1173
1184
|
|
1174
|
-
<div id="method-
|
1175
|
-
<a name="
|
1185
|
+
<div id="method-M000350" class="method-detail">
|
1186
|
+
<a name="M000350"></a>
|
1176
1187
|
|
1177
1188
|
<div class="method-heading">
|
1178
|
-
<a href="#
|
1189
|
+
<a href="#M000350" class="method-signature">
|
1179
1190
|
<span class="method-name">document.standalone? → (true|false)<br />
|
1180
1191
|
</span>
|
1181
1192
|
</a>
|
@@ -1186,8 +1197,8 @@ ruby_xml_document_save(int argc, VALUE *argv, VALUE self) {
|
|
1186
1197
|
Determine whether this is a standalone document.
|
1187
1198
|
</p>
|
1188
1199
|
<p><a class="source-toggle" href="#"
|
1189
|
-
onclick="toggleCode('
|
1190
|
-
<div class="method-source-code" id="
|
1200
|
+
onclick="toggleCode('M000350-source');return false;">[Source]</a></p>
|
1201
|
+
<div class="method-source-code" id="M000350-source">
|
1191
1202
|
<pre>
|
1192
1203
|
/*
|
1193
1204
|
* call-seq:
|
@@ -1203,11 +1214,11 @@ ruby_xml_document_standalone_q(VALUE self) {
|
|
1203
1214
|
</div>
|
1204
1215
|
</div>
|
1205
1216
|
|
1206
|
-
<div id="method-
|
1207
|
-
<a name="
|
1217
|
+
<div id="method-M000351" class="method-detail">
|
1218
|
+
<a name="M000351"></a>
|
1208
1219
|
|
1209
1220
|
<div class="method-heading">
|
1210
|
-
<a href="#
|
1221
|
+
<a href="#M000351" class="method-signature">
|
1211
1222
|
<span class="method-name">document.to_s({format=true,encoding) → "xml"<br />
|
1212
1223
|
</span>
|
1213
1224
|
</a>
|
@@ -1215,18 +1226,19 @@ ruby_xml_document_standalone_q(VALUE self) {
|
|
1215
1226
|
|
1216
1227
|
<div class="method-description">
|
1217
1228
|
<p>
|
1218
|
-
Coerce this document to a string representation of it&#
|
1229
|
+
Coerce this document to a string representation of it‘s <a
|
1219
1230
|
href="../XML.html">XML</a>. The default is to pretty format, but this
|
1220
|
-
depends <a href="Parser.html#
|
1221
|
-
or <a href="Parser.html#
|
1231
|
+
depends <a href="Parser.html#M000064">Parser#indent_tree_output</a>==true
|
1232
|
+
or <a href="Parser.html#M000046">Parser#default_keep_blanks</a>==false.
|
1222
1233
|
</p>
|
1223
1234
|
<p>
|
1224
|
-
The encoding is not applied to the
|
1235
|
+
The <a href="Document.html#M000335">encoding</a> is not applied to the
|
1236
|
+
document, but is <a href="Document.html#M000335">encoding</a> target of the
|
1225
1237
|
resulting string.
|
1226
1238
|
</p>
|
1227
1239
|
<p><a class="source-toggle" href="#"
|
1228
|
-
onclick="toggleCode('
|
1229
|
-
<div class="method-source-code" id="
|
1240
|
+
onclick="toggleCode('M000351-source');return false;">[Source]</a></p>
|
1241
|
+
<div class="method-source-code" id="M000351-source">
|
1230
1242
|
<pre>
|
1231
1243
|
/*
|
1232
1244
|
* call-seq:
|
@@ -1248,11 +1260,11 @@ ruby_xml_document_to_s(int argc, VALUE *argv, VALUE self) {
|
|
1248
1260
|
</div>
|
1249
1261
|
</div>
|
1250
1262
|
|
1251
|
-
<div id="method-
|
1252
|
-
<a name="
|
1263
|
+
<div id="method-M000352" class="method-detail">
|
1264
|
+
<a name="M000352"></a>
|
1253
1265
|
|
1254
1266
|
<div class="method-heading">
|
1255
|
-
<a href="#
|
1267
|
+
<a href="#M000352" class="method-signature">
|
1256
1268
|
<span class="method-name">document.url → "url"<br />
|
1257
1269
|
</span>
|
1258
1270
|
</a>
|
@@ -1260,11 +1272,11 @@ ruby_xml_document_to_s(int argc, VALUE *argv, VALUE self) {
|
|
1260
1272
|
|
1261
1273
|
<div class="method-description">
|
1262
1274
|
<p>
|
1263
|
-
Obtain this document&#
|
1275
|
+
Obtain this document‘s source URL, if any.
|
1264
1276
|
</p>
|
1265
1277
|
<p><a class="source-toggle" href="#"
|
1266
|
-
onclick="toggleCode('
|
1267
|
-
<div class="method-source-code" id="
|
1278
|
+
onclick="toggleCode('M000352-source');return false;">[Source]</a></p>
|
1279
|
+
<div class="method-source-code" id="M000352-source">
|
1268
1280
|
<pre>
|
1269
1281
|
/*
|
1270
1282
|
* call-seq:
|
@@ -1280,11 +1292,11 @@ ruby_xml_document_url_get(VALUE self) {
|
|
1280
1292
|
</div>
|
1281
1293
|
</div>
|
1282
1294
|
|
1283
|
-
<div id="method-
|
1284
|
-
<a name="
|
1295
|
+
<div id="method-M000355" class="method-detail">
|
1296
|
+
<a name="M000355"></a>
|
1285
1297
|
|
1286
1298
|
<div class="method-heading">
|
1287
|
-
<a href="#
|
1299
|
+
<a href="#M000355" class="method-signature">
|
1288
1300
|
<span class="method-name">document.validate(dtd) → (true|false)<br />
|
1289
1301
|
</span>
|
1290
1302
|
</a>
|
@@ -1295,8 +1307,8 @@ ruby_xml_document_url_get(VALUE self) {
|
|
1295
1307
|
Validate this document against the specified XML::DTD.
|
1296
1308
|
</p>
|
1297
1309
|
<p><a class="source-toggle" href="#"
|
1298
|
-
onclick="toggleCode('
|
1299
|
-
<div class="method-source-code" id="
|
1310
|
+
onclick="toggleCode('M000355-source');return false;">[Source]</a></p>
|
1311
|
+
<div class="method-source-code" id="M000355-source">
|
1300
1312
|
<pre>
|
1301
1313
|
/*
|
1302
1314
|
* call-seq:
|
@@ -1312,11 +1324,53 @@ ruby_xml_document_validate_dtd(VALUE self, VALUE dtd) {
|
|
1312
1324
|
</div>
|
1313
1325
|
</div>
|
1314
1326
|
|
1315
|
-
<div id="method-
|
1316
|
-
<a name="
|
1327
|
+
<div id="method-M000357" class="method-detail">
|
1328
|
+
<a name="M000357"></a>
|
1317
1329
|
|
1318
1330
|
<div class="method-heading">
|
1319
|
-
<a href="#
|
1331
|
+
<a href="#M000357" class="method-signature">
|
1332
|
+
<span class="method-name">document.validate_schema(relaxng) → (true|false)<br />
|
1333
|
+
</span>
|
1334
|
+
</a>
|
1335
|
+
</div>
|
1336
|
+
|
1337
|
+
<div class="method-description">
|
1338
|
+
<p>
|
1339
|
+
Validate this document against the specified <a
|
1340
|
+
href="RelaxNG.html">XML::RelaxNG</a>.
|
1341
|
+
</p>
|
1342
|
+
<p>
|
1343
|
+
If a block is provided it is used as an error handler for validaten errors.
|
1344
|
+
The block is called with two argument, the message and a flag indication if
|
1345
|
+
the message is an error (true) or a warning (false).
|
1346
|
+
</p>
|
1347
|
+
<p><a class="source-toggle" href="#"
|
1348
|
+
onclick="toggleCode('M000357-source');return false;">[Source]</a></p>
|
1349
|
+
<div class="method-source-code" id="M000357-source">
|
1350
|
+
<pre>
|
1351
|
+
/*
|
1352
|
+
* call-seq:
|
1353
|
+
* document.validate_schema(relaxng) -> (true|false)
|
1354
|
+
*
|
1355
|
+
* Validate this document against the specified XML::RelaxNG.
|
1356
|
+
*
|
1357
|
+
* If a block is provided it is used as an error handler for validaten errors.
|
1358
|
+
* The block is called with two argument, the message and a flag indication
|
1359
|
+
* if the message is an error (true) or a warning (false).
|
1360
|
+
*/
|
1361
|
+
VALUE
|
1362
|
+
ruby_xml_document_validate_relaxng(VALUE self, VALUE relaxng) {
|
1363
|
+
|
1364
|
+
</pre>
|
1365
|
+
</div>
|
1366
|
+
</div>
|
1367
|
+
</div>
|
1368
|
+
|
1369
|
+
<div id="method-M000356" class="method-detail">
|
1370
|
+
<a name="M000356"></a>
|
1371
|
+
|
1372
|
+
<div class="method-heading">
|
1373
|
+
<a href="#M000356" class="method-signature">
|
1320
1374
|
<span class="method-name">document.validate_schema(schema) → (true|false)<br />
|
1321
1375
|
</span>
|
1322
1376
|
</a>
|
@@ -1326,16 +1380,25 @@ ruby_xml_document_validate_dtd(VALUE self, VALUE dtd) {
|
|
1326
1380
|
<p>
|
1327
1381
|
Validate this document against the specified <a
|
1328
1382
|
href="Schema.html">XML::Schema</a>.
|
1383
|
+
</p>
|
1384
|
+
<p>
|
1385
|
+
If a block is provided it is used as an error handler for validaten errors.
|
1386
|
+
The block is called with two argument, the message and a flag indication if
|
1387
|
+
the message is an error (true) or a warning (false).
|
1329
1388
|
</p>
|
1330
1389
|
<p><a class="source-toggle" href="#"
|
1331
|
-
onclick="toggleCode('
|
1332
|
-
<div class="method-source-code" id="
|
1390
|
+
onclick="toggleCode('M000356-source');return false;">[Source]</a></p>
|
1391
|
+
<div class="method-source-code" id="M000356-source">
|
1333
1392
|
<pre>
|
1334
1393
|
/*
|
1335
1394
|
* call-seq:
|
1336
1395
|
* document.validate_schema(schema) -> (true|false)
|
1337
1396
|
*
|
1338
1397
|
* Validate this document against the specified XML::Schema.
|
1398
|
+
*
|
1399
|
+
* If a block is provided it is used as an error handler for validaten errors.
|
1400
|
+
* The block is called with two argument, the message and a flag indication
|
1401
|
+
* if the message is an error (true) or a warning (false).
|
1339
1402
|
*/
|
1340
1403
|
VALUE
|
1341
1404
|
ruby_xml_document_validate_schema(VALUE self, VALUE schema) {
|
@@ -1345,11 +1408,11 @@ ruby_xml_document_validate_schema(VALUE self, VALUE schema) {
|
|
1345
1408
|
</div>
|
1346
1409
|
</div>
|
1347
1410
|
|
1348
|
-
<div id="method-
|
1349
|
-
<a name="
|
1411
|
+
<div id="method-M000353" class="method-detail">
|
1412
|
+
<a name="M000353"></a>
|
1350
1413
|
|
1351
1414
|
<div class="method-heading">
|
1352
|
-
<a href="#
|
1415
|
+
<a href="#M000353" class="method-signature">
|
1353
1416
|
<span class="method-name">document.version → "version"<br />
|
1354
1417
|
</span>
|
1355
1418
|
</a>
|
@@ -1357,12 +1420,12 @@ ruby_xml_document_validate_schema(VALUE self, VALUE schema) {
|
|
1357
1420
|
|
1358
1421
|
<div class="method-description">
|
1359
1422
|
<p>
|
1360
|
-
Obtain the <a href="../XML.html">XML</a>
|
1361
|
-
document.
|
1423
|
+
Obtain the <a href="../XML.html">XML</a> <a
|
1424
|
+
href="Document.html#M000353">version</a> specified by this document.
|
1362
1425
|
</p>
|
1363
1426
|
<p><a class="source-toggle" href="#"
|
1364
|
-
onclick="toggleCode('
|
1365
|
-
<div class="method-source-code" id="
|
1427
|
+
onclick="toggleCode('M000353-source');return false;">[Source]</a></p>
|
1428
|
+
<div class="method-source-code" id="M000353-source">
|
1366
1429
|
<pre>
|
1367
1430
|
/*
|
1368
1431
|
* call-seq:
|
@@ -1378,11 +1441,11 @@ ruby_xml_document_version_get(VALUE self) {
|
|
1378
1441
|
</div>
|
1379
1442
|
</div>
|
1380
1443
|
|
1381
|
-
<div id="method-
|
1382
|
-
<a name="
|
1444
|
+
<div id="method-M000354" class="method-detail">
|
1445
|
+
<a name="M000354"></a>
|
1383
1446
|
|
1384
1447
|
<div class="method-heading">
|
1385
|
-
<a href="#
|
1448
|
+
<a href="#M000354" class="method-signature">
|
1386
1449
|
<span class="method-name">document.xinclude → num<br />
|
1387
1450
|
</span>
|
1388
1451
|
</a>
|
@@ -1390,11 +1453,12 @@ ruby_xml_document_version_get(VALUE self) {
|
|
1390
1453
|
|
1391
1454
|
<div class="method-description">
|
1392
1455
|
<p>
|
1393
|
-
Process xinclude directives in this
|
1456
|
+
Process <a href="Document.html#M000354">xinclude</a> directives in this
|
1457
|
+
document.
|
1394
1458
|
</p>
|
1395
1459
|
<p><a class="source-toggle" href="#"
|
1396
|
-
onclick="toggleCode('
|
1397
|
-
<div class="method-source-code" id="
|
1460
|
+
onclick="toggleCode('M000354-source');return false;">[Source]</a></p>
|
1461
|
+
<div class="method-source-code" id="M000354-source">
|
1398
1462
|
<pre>
|
1399
1463
|
/*
|
1400
1464
|
* call-seq:
|