libxml-ruby 0.6.0-x86-mswin32-60 → 0.7.0-x86-mswin32-60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. data/CHANGES +42 -0
  2. data/README +123 -117
  3. data/doc/classes/XML.html +226 -0
  4. data/doc/classes/XML/Attr.html +969 -0
  5. data/doc/classes/XML/Attributes.html +487 -0
  6. data/doc/classes/XML/Document.html +1423 -0
  7. data/doc/classes/XML/Dtd.html +159 -0
  8. data/doc/classes/XML/Error.html +111 -0
  9. data/doc/classes/XML/HTMLParser.html +330 -0
  10. data/doc/classes/XML/InputCallbacks.html +154 -0
  11. data/doc/classes/XML/NS.html +366 -0
  12. data/doc/classes/XML/Node.html +3292 -0
  13. data/doc/classes/XML/Node/FailedModify.html +111 -0
  14. data/doc/classes/XML/Node/Set.html +435 -0
  15. data/doc/classes/XML/Node/SetNamespace.html +111 -0
  16. data/doc/classes/XML/Node/UnknownType.html +111 -0
  17. data/doc/classes/XML/Parser.html +2178 -0
  18. data/doc/classes/XML/Parser/Context.html +1233 -0
  19. data/doc/classes/XML/Parser/ParseError.html +111 -0
  20. data/doc/classes/XML/Reader.html +2173 -0
  21. data/doc/classes/XML/SaxParser.html +396 -0
  22. data/doc/classes/XML/SiblingEnum.html +142 -0
  23. data/doc/classes/XML/State.html +118 -0
  24. data/doc/classes/XML/Tree.html +224 -0
  25. data/doc/classes/XML/XInclude.html +117 -0
  26. data/doc/classes/XML/XInclude/Error.html +111 -0
  27. data/doc/classes/XML/XMLParserOptions.html +198 -0
  28. data/doc/classes/XML/XPath.html +269 -0
  29. data/doc/classes/XML/XPath/Context.html +193 -0
  30. data/doc/classes/XML/XPath/InvalidPath.html +111 -0
  31. data/doc/classes/XML/XPath/Object.html +439 -0
  32. data/doc/classes/XML/XPointer.html +164 -0
  33. data/doc/classes/XML/XPointer/Context.html +117 -0
  34. data/doc/classes/XML/XPointer/Context/InvalidPath.html +111 -0
  35. data/doc/classes/XML/XPointer/InvalidExpression.html +111 -0
  36. data/doc/classes/singleton.html +114 -0
  37. data/doc/created.rid +1 -0
  38. data/doc/files/CHANGES.html +375 -0
  39. data/doc/files/LICENSE.html +133 -0
  40. data/doc/files/README.html +279 -0
  41. data/doc/files/VERSION.html +107 -0
  42. data/doc/files/ext/libxml/cbg_c.html +101 -0
  43. data/doc/files/ext/libxml/libxml_c.html +101 -0
  44. data/doc/files/ext/libxml/ruby_xml_attr_c.html +101 -0
  45. data/doc/files/ext/libxml/ruby_xml_attributes_c.html +101 -0
  46. data/doc/files/ext/libxml/ruby_xml_document_c.html +101 -0
  47. data/doc/files/ext/libxml/ruby_xml_dtd_c.html +101 -0
  48. data/doc/files/ext/libxml/ruby_xml_html_parser_c.html +101 -0
  49. data/doc/files/ext/libxml/ruby_xml_input_cbg_c.html +101 -0
  50. data/doc/files/ext/libxml/ruby_xml_node_c.html +101 -0
  51. data/doc/files/ext/libxml/ruby_xml_node_set_c.html +101 -0
  52. data/doc/files/ext/libxml/ruby_xml_ns_c.html +101 -0
  53. data/doc/files/ext/libxml/ruby_xml_parser_c.html +101 -0
  54. data/doc/files/ext/libxml/ruby_xml_parser_context_c.html +101 -0
  55. data/doc/files/ext/libxml/ruby_xml_reader_c.html +101 -0
  56. data/doc/files/ext/libxml/ruby_xml_sax_parser_c.html +101 -0
  57. data/doc/files/ext/libxml/ruby_xml_schema_c.html +101 -0
  58. data/doc/files/ext/libxml/ruby_xml_state_c.html +101 -0
  59. data/doc/files/ext/libxml/ruby_xml_tree_c.html +101 -0
  60. data/doc/files/ext/libxml/ruby_xml_xinclude_c.html +101 -0
  61. data/doc/files/ext/libxml/ruby_xml_xpath_c.html +101 -0
  62. data/doc/files/ext/libxml/ruby_xml_xpath_context_c.html +101 -0
  63. data/doc/files/ext/libxml/ruby_xml_xpath_object_c.html +101 -0
  64. data/doc/files/ext/libxml/ruby_xml_xpointer_c.html +101 -0
  65. data/doc/files/ext/libxml/ruby_xml_xpointer_context_c.html +101 -0
  66. data/doc/files/lib/libxml_rb.html +115 -0
  67. data/doc/files/lib/xml/libxml_rb.html +114 -0
  68. data/doc/fr_class_index.html +60 -0
  69. data/doc/fr_file_index.html +56 -0
  70. data/doc/fr_method_index.html +373 -0
  71. data/doc/index.html +24 -0
  72. data/doc/rdoc-style.css +208 -0
  73. data/ext/libxml/cbg.c +76 -76
  74. data/ext/libxml/extconf.rb +308 -308
  75. data/ext/libxml/libxml.c +58 -62
  76. data/ext/libxml/ruby_libxml.h +1 -0
  77. data/ext/libxml/ruby_xml_attr.c +201 -113
  78. data/ext/libxml/ruby_xml_attr.h +6 -9
  79. data/ext/libxml/ruby_xml_attributes.c +268 -0
  80. data/ext/libxml/ruby_xml_attributes.h +17 -0
  81. data/ext/libxml/ruby_xml_document.c +80 -66
  82. data/ext/libxml/ruby_xml_dtd.c +2 -2
  83. data/ext/libxml/ruby_xml_dtd.h +17 -17
  84. data/ext/libxml/ruby_xml_html_parser.c +18 -19
  85. data/ext/libxml/ruby_xml_html_parser.h +29 -29
  86. data/ext/libxml/ruby_xml_input_cbg.c +6 -0
  87. data/ext/libxml/ruby_xml_input_cbg.h +20 -20
  88. data/ext/libxml/ruby_xml_node.c +438 -536
  89. data/ext/libxml/ruby_xml_node.h +17 -27
  90. data/ext/libxml/ruby_xml_node_set.c +10 -9
  91. data/ext/libxml/ruby_xml_node_set.h +20 -20
  92. data/ext/libxml/ruby_xml_ns.c +60 -69
  93. data/ext/libxml/ruby_xml_ns.h +12 -21
  94. data/ext/libxml/ruby_xml_parser.c +54 -53
  95. data/ext/libxml/ruby_xml_parser.h +31 -31
  96. data/ext/libxml/ruby_xml_parser_context.c +37 -91
  97. data/ext/libxml/ruby_xml_parser_context.h +20 -22
  98. data/ext/libxml/ruby_xml_reader.h +14 -14
  99. data/ext/libxml/ruby_xml_sax_parser.c +55 -55
  100. data/ext/libxml/ruby_xml_sax_parser.h +56 -56
  101. data/ext/libxml/ruby_xml_schema.c +44 -51
  102. data/ext/libxml/ruby_xml_schema.h +16 -16
  103. data/ext/libxml/ruby_xml_state.c +35 -96
  104. data/ext/libxml/ruby_xml_state.h +2 -3
  105. data/ext/libxml/ruby_xml_tree.h +12 -12
  106. data/ext/libxml/ruby_xml_xinclude.h +13 -13
  107. data/ext/libxml/ruby_xml_xpath.c +57 -18
  108. data/ext/libxml/ruby_xml_xpath.h +23 -23
  109. data/ext/libxml/ruby_xml_xpath_context.c +11 -7
  110. data/ext/libxml/ruby_xml_xpath_context.h +20 -20
  111. data/ext/libxml/ruby_xml_xpath_object.c +9 -16
  112. data/ext/libxml/ruby_xml_xpath_object.h +4 -10
  113. data/ext/libxml/ruby_xml_xpointer.c +11 -11
  114. data/ext/libxml/ruby_xml_xpointer.h +27 -27
  115. data/ext/libxml/ruby_xml_xpointer_context.h +18 -18
  116. data/ext/libxml/version.h +2 -2
  117. data/lib/libxml.rb +134 -125
  118. data/lib/libxml_ruby.so +0 -0
  119. data/mingw/libiconv-2.dll +0 -0
  120. data/mingw/libxml2-2.dll +0 -0
  121. data/mingw/libxml_ruby.so +0 -0
  122. data/test/ets_copy_bug.rb +1 -1
  123. data/test/ets_copy_bug2.rb +16 -27
  124. data/test/ets_doc_to_s.rb +1 -1
  125. data/test/ets_gpx.rb +1 -1
  126. data/test/ets_node_gc.rb +1 -1
  127. data/test/ets_tsr.rb +1 -1
  128. data/test/tc_well_formed.rb +1 -1
  129. data/test/tc_xml_attributes.rb +106 -0
  130. data/test/tc_xml_document.rb +10 -10
  131. data/test/tc_xml_document_write3.rb +1 -1
  132. data/test/tc_xml_dtd.rb +49 -0
  133. data/test/tc_xml_html_parser.rb +3 -3
  134. data/test/tc_xml_node.rb +69 -33
  135. data/test/tc_xml_node_attr.rb +170 -0
  136. data/test/{tc_xml_node8.rb → tc_xml_node_cdata.rb} +2 -2
  137. data/test/{tc_xml_node9.rb → tc_xml_node_comment.rb} +3 -3
  138. data/test/tc_xml_node_edit.rb +91 -0
  139. data/test/tc_xml_parser.rb +97 -50
  140. data/test/tc_xml_parser_context.rb +61 -23
  141. data/test/tc_xml_schema.rb +39 -0
  142. data/test/tc_xml_xinclude.rb +5 -6
  143. data/test/tc_xml_xpath.rb +51 -27
  144. data/test/test_suite.rb +27 -0
  145. data/vc/{libxml.sln → libxml_ruby.sln} +5 -5
  146. data/vc/{libxml.vcproj → libxml_ruby.vcproj} +9 -1
  147. metadata +106 -54
  148. data/mingw/mingw.rake +0 -36
  149. data/test/dtd-test.rb +0 -24
  150. data/test/merge_bug.rb +0 -55
  151. data/test/schema-test.rb +0 -74
  152. data/test/tc_xml_node2.rb +0 -25
  153. data/test/tc_xml_node3.rb +0 -27
  154. data/test/tc_xml_node4.rb +0 -86
  155. data/test/tc_xml_node5.rb +0 -52
  156. data/test/tc_xml_node6.rb +0 -27
  157. data/test/tc_xml_node7.rb +0 -35
  158. data/test/tc_xml_parser2.rb +0 -16
  159. data/test/tc_xml_parser3.rb +0 -23
  160. data/test/tc_xml_parser4.rb +0 -33
  161. data/test/tc_xml_parser5.rb +0 -27
  162. data/test/tc_xml_parser6.rb +0 -23
  163. data/test/tc_xml_parser7.rb +0 -28
  164. data/test/tc_xml_parser8.rb +0 -32
  165. data/test/tc_xml_parser9.rb +0 -11
  166. data/test/tc_xml_xpath2.rb +0 -14
  167. data/work/vc/debug/libxml.exp +0 -0
  168. data/work/vc/debug/libxml.ilk +0 -0
  169. data/work/vc/debug/libxml.lib +0 -0
  170. data/work/vc/debug/libxml.pdb +0 -0
  171. data/work/vc/debug/libxml.so +0 -0
@@ -0,0 +1,1423 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: XML::Document</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">XML::Document</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/ext/libxml/libxml_c.html">
59
+ ext/libxml/libxml.c
60
+ </a>
61
+ <br />
62
+ <a href="../../files/lib/libxml_rb.html">
63
+ lib/libxml.rb
64
+ </a>
65
+ <br />
66
+ </td>
67
+ </tr>
68
+
69
+ <tr class="top-aligned-row">
70
+ <td><strong>Parent:</strong></td>
71
+ <td>
72
+ Object
73
+ </td>
74
+ </tr>
75
+ </table>
76
+ </div>
77
+ <!-- banner header -->
78
+
79
+ <div id="bodyContent">
80
+
81
+
82
+
83
+ <div id="contextContent">
84
+
85
+ <div id="description">
86
+ <p>
87
+ Reads or writes an <a href="../XML.html">XML</a> document:
88
+ </p>
89
+ <p>
90
+ Reading:
91
+ </p>
92
+ <pre>
93
+ require 'libxml'
94
+
95
+ doc = XML::Document.new()
96
+ doc.root = XML::Node.new('root_node')
97
+ doc.root &lt;&lt; XML::Node.new('elem1')
98
+ doc.save('output.xml', format)
99
+ </pre>
100
+ <p>
101
+ Writing:
102
+ </p>
103
+ <pre>
104
+ require 'libxml'
105
+ doc = XML::Document.file('output.xml')
106
+ root = doc.root
107
+ </pre>
108
+
109
+ </div>
110
+
111
+
112
+ </div>
113
+
114
+ <div id="method-list">
115
+ <h3 class="section-bar">Methods</h3>
116
+
117
+ <div class="name-list">
118
+ <a href="#M000308">child</a>&nbsp;&nbsp;
119
+ <a href="#M000309">child?</a>&nbsp;&nbsp;
120
+ <a href="#M000310">compression</a>&nbsp;&nbsp;
121
+ <a href="#M000311">compression=</a>&nbsp;&nbsp;
122
+ <a href="#M000312">compression?</a>&nbsp;&nbsp;
123
+ <a href="#M000314">debug_dump</a>&nbsp;&nbsp;
124
+ <a href="#M000315">debug_dump_head</a>&nbsp;&nbsp;
125
+ <a href="#M000316">debug_format_dump</a>&nbsp;&nbsp;
126
+ <a href="#M000313">dump</a>&nbsp;&nbsp;
127
+ <a href="#M000341">each</a>&nbsp;&nbsp;
128
+ <a href="#M000317">encoding</a>&nbsp;&nbsp;
129
+ <a href="#M000318">encoding=</a>&nbsp;&nbsp;
130
+ <a href="#M000306">file</a>&nbsp;&nbsp;
131
+ <a href="#M000319">filename</a>&nbsp;&nbsp;
132
+ <a href="#M000320">find</a>&nbsp;&nbsp;
133
+ <a href="#M000321">format_dump</a>&nbsp;&nbsp;
134
+ <a href="#M000322">last</a>&nbsp;&nbsp;
135
+ <a href="#M000323">last?</a>&nbsp;&nbsp;
136
+ <a href="#M000307">new</a>&nbsp;&nbsp;
137
+ <a href="#M000324">next</a>&nbsp;&nbsp;
138
+ <a href="#M000325">next?</a>&nbsp;&nbsp;
139
+ <a href="#M000326">parent</a>&nbsp;&nbsp;
140
+ <a href="#M000327">parent?</a>&nbsp;&nbsp;
141
+ <a href="#M000328">prev</a>&nbsp;&nbsp;
142
+ <a href="#M000329">prev?</a>&nbsp;&nbsp;
143
+ <a href="#M000340">reader</a>&nbsp;&nbsp;
144
+ <a href="#M000330">root</a>&nbsp;&nbsp;
145
+ <a href="#M000331">root=</a>&nbsp;&nbsp;
146
+ <a href="#M000332">save</a>&nbsp;&nbsp;
147
+ <a href="#M000333">standalone?</a>&nbsp;&nbsp;
148
+ <a href="#M000334">to_s</a>&nbsp;&nbsp;
149
+ <a href="#M000335">url</a>&nbsp;&nbsp;
150
+ <a href="#M000338">validate</a>&nbsp;&nbsp;
151
+ <a href="#M000339">validate_schema</a>&nbsp;&nbsp;
152
+ <a href="#M000336">version</a>&nbsp;&nbsp;
153
+ <a href="#M000337">xinclude</a>&nbsp;&nbsp;
154
+ </div>
155
+ </div>
156
+
157
+ </div>
158
+
159
+
160
+ <!-- if includes -->
161
+ <div id="includes">
162
+ <h3 class="section-bar">Included Modules</h3>
163
+
164
+ <div id="includes-list">
165
+ <span class="include-name">Enumerable</span>
166
+ </div>
167
+ </div>
168
+
169
+ <div id="section">
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+ <!-- if method_list -->
179
+ <div id="methods">
180
+ <h3 class="section-bar">Public Class methods</h3>
181
+
182
+ <div id="method-M000306" class="method-detail">
183
+ <a name="M000306"></a>
184
+
185
+ <div class="method-heading">
186
+ <a href="#M000306" class="method-signature">
187
+ <span class="method-name">XML::Document.file(filename) &rarr; document<br />
188
+ </span>
189
+ </a>
190
+ </div>
191
+
192
+ <div class="method-description">
193
+ <p>
194
+ Create a new <a href="Document.html">XML::Document</a> by parsing the
195
+ specified file.
196
+ </p>
197
+ <p><a class="source-toggle" href="#"
198
+ onclick="toggleCode('M000306-source');return false;">[Source]</a></p>
199
+ <div class="method-source-code" id="M000306-source">
200
+ <pre>
201
+ /*
202
+ * call-seq:
203
+ * XML::Document.file(filename) -&gt; document
204
+ *
205
+ * Create a new XML::Document by parsing the specified
206
+ * file.
207
+ */
208
+ VALUE
209
+ ruby_xml_document_new_file(VALUE class, VALUE filename) {
210
+
211
+ </pre>
212
+ </div>
213
+ </div>
214
+ </div>
215
+
216
+ <div id="method-M000307" class="method-detail">
217
+ <a name="M000307"></a>
218
+
219
+ <div class="method-heading">
220
+ <a href="#M000307" class="method-signature">
221
+ <span class="method-name">XML::Document.new(xml_version = 1.0) &rarr; document<br />
222
+ </span>
223
+ </a>
224
+ </div>
225
+
226
+ <div class="method-description">
227
+ <p>
228
+ Create a new <a href="Document.html">XML::Document</a>, optionally
229
+ specifying the <a href="../XML.html">XML</a> version.
230
+ </p>
231
+ <p><a class="source-toggle" href="#"
232
+ onclick="toggleCode('M000307-source');return false;">[Source]</a></p>
233
+ <div class="method-source-code" id="M000307-source">
234
+ <pre>
235
+ /*
236
+ * call-seq:
237
+ * XML::Document.new(xml_version = 1.0) -&gt; document
238
+ *
239
+ * Create a new XML::Document, optionally specifying the
240
+ * XML version.
241
+ */
242
+ VALUE
243
+ ruby_xml_document_new(int argc, VALUE *argv, VALUE class) {
244
+
245
+ </pre>
246
+ </div>
247
+ </div>
248
+ </div>
249
+
250
+ <h3 class="section-bar">Public Instance methods</h3>
251
+
252
+ <div id="method-M000308" class="method-detail">
253
+ <a name="M000308"></a>
254
+
255
+ <div class="method-heading">
256
+ <a href="#M000308" class="method-signature">
257
+ <span class="method-name">document.child &rarr; node<br />
258
+ </span>
259
+ </a>
260
+ </div>
261
+
262
+ <div class="method-description">
263
+ <p>
264
+ Get this document&#8217;s child node.
265
+ </p>
266
+ <p><a class="source-toggle" href="#"
267
+ onclick="toggleCode('M000308-source');return false;">[Source]</a></p>
268
+ <div class="method-source-code" id="M000308-source">
269
+ <pre>
270
+ /*
271
+ * call-seq:
272
+ * document.child -&gt; node
273
+ *
274
+ * Get this document's child node.
275
+ */
276
+ VALUE
277
+ ruby_xml_document_child_get(VALUE self) {
278
+
279
+ </pre>
280
+ </div>
281
+ </div>
282
+ </div>
283
+
284
+ <div id="method-M000309" class="method-detail">
285
+ <a name="M000309"></a>
286
+
287
+ <div class="method-heading">
288
+ <a href="#M000309" class="method-signature">
289
+ <span class="method-name">document.child? &rarr; (true|false)<br />
290
+ </span>
291
+ </a>
292
+ </div>
293
+
294
+ <div class="method-description">
295
+ <p>
296
+ Determine whether this document has a child node.
297
+ </p>
298
+ <p><a class="source-toggle" href="#"
299
+ onclick="toggleCode('M000309-source');return false;">[Source]</a></p>
300
+ <div class="method-source-code" id="M000309-source">
301
+ <pre>
302
+ /*
303
+ * call-seq:
304
+ * document.child? -&gt; (true|false)
305
+ *
306
+ * Determine whether this document has a child node.
307
+ */
308
+ VALUE
309
+ ruby_xml_document_child_q(VALUE self) {
310
+
311
+ </pre>
312
+ </div>
313
+ </div>
314
+ </div>
315
+
316
+ <div id="method-M000310" class="method-detail">
317
+ <a name="M000310"></a>
318
+
319
+ <div class="method-heading">
320
+ <a href="#M000310" class="method-signature">
321
+ <span class="method-name">document.compression &rarr; num<br />
322
+ </span>
323
+ </a>
324
+ </div>
325
+
326
+ <div class="method-description">
327
+ <p>
328
+ Obtain this document&#8217;s compression mode identifier.
329
+ </p>
330
+ <p><a class="source-toggle" href="#"
331
+ onclick="toggleCode('M000310-source');return false;">[Source]</a></p>
332
+ <div class="method-source-code" id="M000310-source">
333
+ <pre>
334
+ /*
335
+ * call-seq:
336
+ * document.compression -&gt; num
337
+ *
338
+ * Obtain this document's compression mode identifier.
339
+ */
340
+ VALUE
341
+ ruby_xml_document_compression_get(VALUE self) {
342
+
343
+ </pre>
344
+ </div>
345
+ </div>
346
+ </div>
347
+
348
+ <div id="method-M000311" class="method-detail">
349
+ <a name="M000311"></a>
350
+
351
+ <div class="method-heading">
352
+ <a href="#M000311" class="method-signature">
353
+ <span class="method-name">document.compression = num<br />
354
+ </span>
355
+ </a>
356
+ </div>
357
+
358
+ <div class="method-description">
359
+ <p>
360
+ Set this document&#8217;s compression mode.
361
+ </p>
362
+ <p><a class="source-toggle" href="#"
363
+ onclick="toggleCode('M000311-source');return false;">[Source]</a></p>
364
+ <div class="method-source-code" id="M000311-source">
365
+ <pre>
366
+ /*
367
+ * call-seq:
368
+ * document.compression = num
369
+ *
370
+ * Set this document's compression mode.
371
+ */
372
+ VALUE
373
+ ruby_xml_document_compression_set(VALUE self, VALUE num) {
374
+
375
+ </pre>
376
+ </div>
377
+ </div>
378
+ </div>
379
+
380
+ <div id="method-M000312" class="method-detail">
381
+ <a name="M000312"></a>
382
+
383
+ <div class="method-heading">
384
+ <a href="#M000312" class="method-signature">
385
+ <span class="method-name">document.compression? &rarr; (true|false)<br />
386
+ </span>
387
+ </a>
388
+ </div>
389
+
390
+ <div class="method-description">
391
+ <p>
392
+ Determine whether this document is compressed.
393
+ </p>
394
+ <p><a class="source-toggle" href="#"
395
+ onclick="toggleCode('M000312-source');return false;">[Source]</a></p>
396
+ <div class="method-source-code" id="M000312-source">
397
+ <pre>
398
+ /*
399
+ * call-seq:
400
+ * document.compression? -&gt; (true|false)
401
+ *
402
+ * Determine whether this document is compressed.
403
+ */
404
+ VALUE
405
+ ruby_xml_document_compression_q(VALUE self) {
406
+
407
+ </pre>
408
+ </div>
409
+ </div>
410
+ </div>
411
+
412
+ <div id="method-M000314" class="method-detail">
413
+ <a name="M000314"></a>
414
+
415
+ <div class="method-heading">
416
+ <a href="#M000314" class="method-signature">
417
+ <span class="method-name">document.debug_dump([stream]) &rarr; true<br />
418
+ </span>
419
+ </a>
420
+ </div>
421
+
422
+ <div class="method-description">
423
+ <p>
424
+ Debug version of dump.
425
+ </p>
426
+ <p><a class="source-toggle" href="#"
427
+ onclick="toggleCode('M000314-source');return false;">[Source]</a></p>
428
+ <div class="method-source-code" id="M000314-source">
429
+ <pre>
430
+ /*
431
+ * call-seq:
432
+ * document.debug_dump([stream]) -&gt; true
433
+ *
434
+ * Debug version of dump.
435
+ */
436
+ VALUE
437
+ ruby_xml_document_debug_dump(int argc, VALUE *argv, VALUE self) {
438
+
439
+ </pre>
440
+ </div>
441
+ </div>
442
+ </div>
443
+
444
+ <div id="method-M000315" class="method-detail">
445
+ <a name="M000315"></a>
446
+
447
+ <div class="method-heading">
448
+ <a href="#M000315" class="method-signature">
449
+ <span class="method-name">document.debug_dump_head([stream]) &rarr; true<br />
450
+ </span>
451
+ </a>
452
+ </div>
453
+
454
+ <div class="method-description">
455
+ <p>
456
+ Debug-dump this document&#8217;s header to the specified IO stream. If no
457
+ stream is specified, stdout is used.
458
+ </p>
459
+ <p><a class="source-toggle" href="#"
460
+ onclick="toggleCode('M000315-source');return false;">[Source]</a></p>
461
+ <div class="method-source-code" id="M000315-source">
462
+ <pre>
463
+ /*
464
+ * call-seq:
465
+ * document.debug_dump_head([stream]) -&gt; true
466
+ *
467
+ * Debug-dump this document's header to the specified IO stream.
468
+ * If no stream is specified, stdout is used.
469
+ */
470
+ VALUE
471
+ ruby_xml_document_debug_dump_head(int argc, VALUE *argv, VALUE self) {
472
+
473
+ </pre>
474
+ </div>
475
+ </div>
476
+ </div>
477
+
478
+ <div id="method-M000316" class="method-detail">
479
+ <a name="M000316"></a>
480
+
481
+ <div class="method-heading">
482
+ <a href="#M000316" class="method-signature">
483
+ <span class="method-name">document.debug_format_dump([stream]) &rarr; true<br />
484
+ </span>
485
+ </a>
486
+ </div>
487
+
488
+ <div class="method-description">
489
+ <p>
490
+ <b>Deprecated</b> in favour of <a
491
+ href="Document.html#M000321">format_dump</a>.
492
+ </p>
493
+ <p><a class="source-toggle" href="#"
494
+ onclick="toggleCode('M000316-source');return false;">[Source]</a></p>
495
+ <div class="method-source-code" id="M000316-source">
496
+ <pre>
497
+ /*
498
+ * call-seq:
499
+ * document.debug_format_dump([stream]) -&gt; true
500
+ *
501
+ * *Deprecated* in favour of format_dump.
502
+ */
503
+ VALUE
504
+ ruby_xml_document_debug_format_dump(int argc, VALUE *argv, VALUE self) {
505
+
506
+ </pre>
507
+ </div>
508
+ </div>
509
+ </div>
510
+
511
+ <div id="method-M000313" class="method-detail">
512
+ <a name="M000313"></a>
513
+
514
+ <div class="method-heading">
515
+ <a href="#M000313" class="method-signature">
516
+ <span class="method-name">document.dump([stream]) &rarr; true<br />
517
+ </span>
518
+ </a>
519
+ </div>
520
+
521
+ <div class="method-description">
522
+ <p>
523
+ Dump this document&#8217;s <a href="../XML.html">XML</a> to the specified
524
+ IO stream. If no stream is specified, stdout is used.
525
+ </p>
526
+ <p><a class="source-toggle" href="#"
527
+ onclick="toggleCode('M000313-source');return false;">[Source]</a></p>
528
+ <div class="method-source-code" id="M000313-source">
529
+ <pre>
530
+ /*
531
+ * call-seq:
532
+ * document.dump([stream]) -&gt; true
533
+ *
534
+ * Dump this document's XML to the specified IO stream.
535
+ * If no stream is specified, stdout is used.
536
+ */
537
+ VALUE
538
+ ruby_xml_document_dump(int argc, VALUE *argv, VALUE self) {
539
+
540
+ </pre>
541
+ </div>
542
+ </div>
543
+ </div>
544
+
545
+ <div id="method-M000341" class="method-detail">
546
+ <a name="M000341"></a>
547
+
548
+ <div class="method-heading">
549
+ <a href="#M000341" class="method-signature">
550
+ <span class="method-name">each</span><span class="method-args">(&amp;blk)</span>
551
+ </a>
552
+ </div>
553
+
554
+ <div class="method-description">
555
+ <p>
556
+ maybe, maybe not&#8230;
557
+ </p>
558
+ <p><a class="source-toggle" href="#"
559
+ onclick="toggleCode('M000341-source');return false;">[Source]</a></p>
560
+ <div class="method-source-code" id="M000341-source">
561
+ <pre>
562
+ <span class="ruby-comment cmt"># File lib/libxml.rb, line 30</span>
563
+ 30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
564
+ 31: <span class="ruby-identifier">find</span>(<span class="ruby-value str">'//*'</span>).<span class="ruby-identifier">each</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
565
+ 32: <span class="ruby-keyword kw">end</span>
566
+ </pre>
567
+ </div>
568
+ </div>
569
+ </div>
570
+
571
+ <div id="method-M000317" class="method-detail">
572
+ <a name="M000317"></a>
573
+
574
+ <div class="method-heading">
575
+ <a href="#M000317" class="method-signature">
576
+ <span class="method-name">document.encoding &rarr; "encoding"<br />
577
+ </span>
578
+ </a>
579
+ </div>
580
+
581
+ <div class="method-description">
582
+ <p>
583
+ Obtain the encoding specified by this document.
584
+ </p>
585
+ <p><a class="source-toggle" href="#"
586
+ onclick="toggleCode('M000317-source');return false;">[Source]</a></p>
587
+ <div class="method-source-code" id="M000317-source">
588
+ <pre>
589
+ /*
590
+ * call-seq:
591
+ * document.encoding -&gt; &quot;encoding&quot;
592
+ *
593
+ * Obtain the encoding specified by this document.
594
+ */
595
+ VALUE
596
+ ruby_xml_document_encoding_get(VALUE self) {
597
+
598
+ </pre>
599
+ </div>
600
+ </div>
601
+ </div>
602
+
603
+ <div id="method-M000318" class="method-detail">
604
+ <a name="M000318"></a>
605
+
606
+ <div class="method-heading">
607
+ <a href="#M000318" class="method-signature">
608
+ <span class="method-name">document.encoding = "encoding"<br />
609
+ </span>
610
+ </a>
611
+ </div>
612
+
613
+ <div class="method-description">
614
+ <p>
615
+ Set the encoding for this document.
616
+ </p>
617
+ <p><a class="source-toggle" href="#"
618
+ onclick="toggleCode('M000318-source');return false;">[Source]</a></p>
619
+ <div class="method-source-code" id="M000318-source">
620
+ <pre>
621
+ /*
622
+ * call-seq:
623
+ * document.encoding = &quot;encoding&quot;
624
+ *
625
+ * Set the encoding for this document.
626
+ */
627
+ VALUE
628
+ ruby_xml_document_encoding_set(VALUE self, VALUE encoding) {
629
+
630
+ </pre>
631
+ </div>
632
+ </div>
633
+ </div>
634
+
635
+ <div id="method-M000319" class="method-detail">
636
+ <a name="M000319"></a>
637
+
638
+ <div class="method-heading">
639
+ <a href="#M000319" class="method-signature">
640
+ <span class="method-name">document.filename &rarr; "filename"<br />
641
+ </span>
642
+ </a>
643
+ </div>
644
+
645
+ <div class="method-description">
646
+ <p>
647
+ Obtain the filename this document was read from.
648
+ </p>
649
+ <p><a class="source-toggle" href="#"
650
+ onclick="toggleCode('M000319-source');return false;">[Source]</a></p>
651
+ <div class="method-source-code" id="M000319-source">
652
+ <pre>
653
+ /*
654
+ * call-seq:
655
+ * document.filename -&gt; &quot;filename&quot;
656
+ *
657
+ * Obtain the filename this document was read from.
658
+ */
659
+ VALUE
660
+ ruby_xml_document_filename_get(VALUE self) {
661
+
662
+ </pre>
663
+ </div>
664
+ </div>
665
+ </div>
666
+
667
+ <div id="method-M000320" class="method-detail">
668
+ <a name="M000320"></a>
669
+
670
+ <div class="method-heading">
671
+ <a href="#M000320" class="method-signature">
672
+ <span class="method-name">document.find(xpath_expr, [namespace]) &rarr; XML::Node::Set<br />
673
+ </span>
674
+ </a>
675
+ </div>
676
+
677
+ <div class="method-description">
678
+ <p>
679
+ Find nodes matching the specified xpath expression, optionally using the
680
+ specified namespace. Returns an <a href="Node/Set.html">XML::Node::Set</a>.
681
+ For more information about working with namespaces, please refer to the <a
682
+ href="XPath.html">XML::XPath</a> documentation.
683
+ </p>
684
+ <p>
685
+ IMPORTANT - The returned <a href="Node/Set.html">XML::Node::Set</a> must be
686
+ freed before its associated document. In a running Ruby program this will
687
+ happen automatically via Ruby&#8217;s mark and sweep garbage collector.
688
+ However, if the program exits, Ruby does not guarantee the order in which
689
+ objects are freed (see <a
690
+ 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>).
691
+ As a result, the associated document may be freed before the node list,
692
+ which will cause a segmentation fault.
693
+ </p>
694
+ <p>
695
+ To avoid this, use the following (non-ruby like) coding style:
696
+ </p>
697
+ <pre>
698
+ nodes = doc.find('/header')
699
+ nodes.each do |node|
700
+ ... do stuff ...
701
+ end
702
+
703
+ nodes = nil
704
+ GC.start
705
+ </pre>
706
+ <p><a class="source-toggle" href="#"
707
+ onclick="toggleCode('M000320-source');return false;">[Source]</a></p>
708
+ <div class="method-source-code" id="M000320-source">
709
+ <pre>
710
+ /*
711
+ * call-seq:
712
+ * document.find(xpath_expr, [namespace]) -&gt; XML::Node::Set
713
+ *
714
+ * Find nodes matching the specified xpath expression, optionally
715
+ * using the specified namespace. Returns an XML::Node::Set. For
716
+ * more information about working with namespaces, please refer
717
+ * to the XML::XPath documentation.
718
+ *
719
+ * IMPORTANT - The returned XML::Node::Set must be freed before
720
+ * its associated document. In a running Ruby program this will
721
+ * happen automatically via Ruby's mark and sweep garbage collector.
722
+ * However, if the program exits, Ruby does not guarantee the order
723
+ * in which objects are freed
724
+ * (see http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/17700).
725
+ * As a result, the associated document may be freed before the node
726
+ * list, which will cause a segmentation fault.
727
+ *
728
+ * To avoid this, use the following (non-ruby like) coding style:
729
+ *
730
+ * nodes = doc.find('/header')
731
+ * nodes.each do |node|
732
+ * ... do stuff ...
733
+ * end
734
+ *
735
+ * nodes = nil
736
+ * GC.start
737
+ */
738
+ VALUE
739
+ ruby_xml_document_find(int argc, VALUE *argv, VALUE self) {
740
+
741
+ </pre>
742
+ </div>
743
+ </div>
744
+ </div>
745
+
746
+ <div id="method-M000321" class="method-detail">
747
+ <a name="M000321"></a>
748
+
749
+ <div class="method-heading">
750
+ <a href="#M000321" class="method-signature">
751
+ <span class="method-name">document.format_dump([stream], [spacing]) &rarr; true<br />
752
+ </span>
753
+ </a>
754
+ </div>
755
+
756
+ <div class="method-description">
757
+ <p>
758
+ Dump this document&#8217;s formatted <a href="../XML.html">XML</a> to the
759
+ specified IO stream. If no stream is specified, stdout is used. If spacing
760
+ is specified, it must be a boolean that determines whether spacing is used.
761
+ </p>
762
+ <p><a class="source-toggle" href="#"
763
+ onclick="toggleCode('M000321-source');return false;">[Source]</a></p>
764
+ <div class="method-source-code" id="M000321-source">
765
+ <pre>
766
+ /*
767
+ * call-seq:
768
+ * document.format_dump([stream], [spacing]) -&gt; true
769
+ *
770
+ * Dump this document's formatted XML to the specified IO stream.
771
+ * If no stream is specified, stdout is used. If spacing is
772
+ * specified, it must be a boolean that determines whether
773
+ * spacing is used.
774
+ */
775
+ VALUE
776
+ ruby_xml_document_format_dump(int argc, VALUE *argv, VALUE self) {
777
+
778
+ </pre>
779
+ </div>
780
+ </div>
781
+ </div>
782
+
783
+ <div id="method-M000322" class="method-detail">
784
+ <a name="M000322"></a>
785
+
786
+ <div class="method-heading">
787
+ <a href="#M000322" class="method-signature">
788
+ <span class="method-name">document.last &rarr; node<br />
789
+ </span>
790
+ </a>
791
+ </div>
792
+
793
+ <div class="method-description">
794
+ <p>
795
+ Obtain the last node.
796
+ </p>
797
+ <p><a class="source-toggle" href="#"
798
+ onclick="toggleCode('M000322-source');return false;">[Source]</a></p>
799
+ <div class="method-source-code" id="M000322-source">
800
+ <pre>
801
+ /*
802
+ * call-seq:
803
+ * document.last -&gt; node
804
+ *
805
+ * Obtain the last node.
806
+ */
807
+ VALUE
808
+ ruby_xml_document_last_get(VALUE self) {
809
+
810
+ </pre>
811
+ </div>
812
+ </div>
813
+ </div>
814
+
815
+ <div id="method-M000323" class="method-detail">
816
+ <a name="M000323"></a>
817
+
818
+ <div class="method-heading">
819
+ <a href="#M000323" class="method-signature">
820
+ <span class="method-name">document.last? &rarr; (true|false)<br />
821
+ </span>
822
+ </a>
823
+ </div>
824
+
825
+ <div class="method-description">
826
+ <p>
827
+ Determine whether there is a last node.
828
+ </p>
829
+ <p><a class="source-toggle" href="#"
830
+ onclick="toggleCode('M000323-source');return false;">[Source]</a></p>
831
+ <div class="method-source-code" id="M000323-source">
832
+ <pre>
833
+ /*
834
+ * call-seq:
835
+ * document.last? -&gt; (true|false)
836
+ *
837
+ * Determine whether there is a last node.
838
+ */
839
+ VALUE
840
+ ruby_xml_document_last_q(VALUE self) {
841
+
842
+ </pre>
843
+ </div>
844
+ </div>
845
+ </div>
846
+
847
+ <div id="method-M000324" class="method-detail">
848
+ <a name="M000324"></a>
849
+
850
+ <div class="method-heading">
851
+ <a href="#M000324" class="method-signature">
852
+ <span class="method-name">document.next &rarr; node<br />
853
+ </span>
854
+ </a>
855
+ </div>
856
+
857
+ <div class="method-description">
858
+ <p>
859
+ Obtain the next node.
860
+ </p>
861
+ <p><a class="source-toggle" href="#"
862
+ onclick="toggleCode('M000324-source');return false;">[Source]</a></p>
863
+ <div class="method-source-code" id="M000324-source">
864
+ <pre>
865
+ /*
866
+ * call-seq:
867
+ * document.next -&gt; node
868
+ *
869
+ * Obtain the next node.
870
+ */
871
+ VALUE
872
+ ruby_xml_document_next_get(VALUE self) {
873
+
874
+ </pre>
875
+ </div>
876
+ </div>
877
+ </div>
878
+
879
+ <div id="method-M000325" class="method-detail">
880
+ <a name="M000325"></a>
881
+
882
+ <div class="method-heading">
883
+ <a href="#M000325" class="method-signature">
884
+ <span class="method-name">document.next? &rarr; (true|false)<br />
885
+ </span>
886
+ </a>
887
+ </div>
888
+
889
+ <div class="method-description">
890
+ <p>
891
+ Determine whether there is a next node.
892
+ </p>
893
+ <p><a class="source-toggle" href="#"
894
+ onclick="toggleCode('M000325-source');return false;">[Source]</a></p>
895
+ <div class="method-source-code" id="M000325-source">
896
+ <pre>
897
+ /*
898
+ * call-seq:
899
+ * document.next? -&gt; (true|false)
900
+ *
901
+ * Determine whether there is a next node.
902
+ */
903
+ VALUE
904
+ ruby_xml_document_next_q(VALUE self) {
905
+
906
+ </pre>
907
+ </div>
908
+ </div>
909
+ </div>
910
+
911
+ <div id="method-M000326" class="method-detail">
912
+ <a name="M000326"></a>
913
+
914
+ <div class="method-heading">
915
+ <a href="#M000326" class="method-signature">
916
+ <span class="method-name">document.parent &rarr; node<br />
917
+ </span>
918
+ </a>
919
+ </div>
920
+
921
+ <div class="method-description">
922
+ <p>
923
+ Obtain the parent node.
924
+ </p>
925
+ <p><a class="source-toggle" href="#"
926
+ onclick="toggleCode('M000326-source');return false;">[Source]</a></p>
927
+ <div class="method-source-code" id="M000326-source">
928
+ <pre>
929
+ /*
930
+ * call-seq:
931
+ * document.parent -&gt; node
932
+ *
933
+ * Obtain the parent node.
934
+ */
935
+ VALUE
936
+ ruby_xml_document_parent_get(VALUE self) {
937
+
938
+ </pre>
939
+ </div>
940
+ </div>
941
+ </div>
942
+
943
+ <div id="method-M000327" class="method-detail">
944
+ <a name="M000327"></a>
945
+
946
+ <div class="method-heading">
947
+ <a href="#M000327" class="method-signature">
948
+ <span class="method-name">document.parent? &rarr; (true|false)<br />
949
+ </span>
950
+ </a>
951
+ </div>
952
+
953
+ <div class="method-description">
954
+ <p>
955
+ Determine whether there is a parent node.
956
+ </p>
957
+ <p><a class="source-toggle" href="#"
958
+ onclick="toggleCode('M000327-source');return false;">[Source]</a></p>
959
+ <div class="method-source-code" id="M000327-source">
960
+ <pre>
961
+ /*
962
+ * call-seq:
963
+ * document.parent? -&gt; (true|false)
964
+ *
965
+ * Determine whether there is a parent node.
966
+ */
967
+ VALUE
968
+ ruby_xml_document_parent_q(VALUE self) {
969
+
970
+ </pre>
971
+ </div>
972
+ </div>
973
+ </div>
974
+
975
+ <div id="method-M000328" class="method-detail">
976
+ <a name="M000328"></a>
977
+
978
+ <div class="method-heading">
979
+ <a href="#M000328" class="method-signature">
980
+ <span class="method-name">document.prev &rarr; node<br />
981
+ </span>
982
+ </a>
983
+ </div>
984
+
985
+ <div class="method-description">
986
+ <p>
987
+ Obtain the previous node.
988
+ </p>
989
+ <p><a class="source-toggle" href="#"
990
+ onclick="toggleCode('M000328-source');return false;">[Source]</a></p>
991
+ <div class="method-source-code" id="M000328-source">
992
+ <pre>
993
+ /*
994
+ * call-seq:
995
+ * document.prev -&gt; node
996
+ *
997
+ * Obtain the previous node.
998
+ */
999
+ VALUE
1000
+ ruby_xml_document_prev_get(VALUE self) {
1001
+
1002
+ </pre>
1003
+ </div>
1004
+ </div>
1005
+ </div>
1006
+
1007
+ <div id="method-M000329" class="method-detail">
1008
+ <a name="M000329"></a>
1009
+
1010
+ <div class="method-heading">
1011
+ <a href="#M000329" class="method-signature">
1012
+ <span class="method-name">document.prev? &rarr; (true|false)<br />
1013
+ </span>
1014
+ </a>
1015
+ </div>
1016
+
1017
+ <div class="method-description">
1018
+ <p>
1019
+ Determine whether there is a previous node.
1020
+ </p>
1021
+ <p><a class="source-toggle" href="#"
1022
+ onclick="toggleCode('M000329-source');return false;">[Source]</a></p>
1023
+ <div class="method-source-code" id="M000329-source">
1024
+ <pre>
1025
+ /*
1026
+ * call-seq:
1027
+ * document.prev? -&gt; (true|false)
1028
+ *
1029
+ * Determine whether there is a previous node.
1030
+ */
1031
+ VALUE
1032
+ ruby_xml_document_prev_q(VALUE self) {
1033
+
1034
+ </pre>
1035
+ </div>
1036
+ </div>
1037
+ </div>
1038
+
1039
+ <div id="method-M000340" class="method-detail">
1040
+ <a name="M000340"></a>
1041
+
1042
+ <div class="method-heading">
1043
+ <a href="#M000340" class="method-signature">
1044
+ <span class="method-name">document.reader &rarr; reader<br />
1045
+ </span>
1046
+ </a>
1047
+ </div>
1048
+
1049
+ <div class="method-description">
1050
+ <p>
1051
+ Create a <a href="Reader.html">XML::Reader</a> from the document. This is a
1052
+ shortcut to <a href="Reader.html#M000250">XML::Reader.walker</a>().
1053
+ </p>
1054
+ <p><a class="source-toggle" href="#"
1055
+ onclick="toggleCode('M000340-source');return false;">[Source]</a></p>
1056
+ <div class="method-source-code" id="M000340-source">
1057
+ <pre>
1058
+ /*
1059
+ * call-seq:
1060
+ * document.reader -&gt; reader
1061
+ *
1062
+ * Create a XML::Reader from the document. This is a shortcut to
1063
+ * XML::Reader.walker().
1064
+ */
1065
+ static VALUE
1066
+ ruby_xml_document_reader(VALUE self)
1067
+ {
1068
+ return ruby_xml_reader_new_walker(cXMLReader, self);
1069
+ }
1070
+ </pre>
1071
+ </div>
1072
+ </div>
1073
+ </div>
1074
+
1075
+ <div id="method-M000330" class="method-detail">
1076
+ <a name="M000330"></a>
1077
+
1078
+ <div class="method-heading">
1079
+ <a href="#M000330" class="method-signature">
1080
+ <span class="method-name">document.root &rarr; node<br />
1081
+ </span>
1082
+ </a>
1083
+ </div>
1084
+
1085
+ <div class="method-description">
1086
+ <p>
1087
+ Obtain the root node.
1088
+ </p>
1089
+ <p><a class="source-toggle" href="#"
1090
+ onclick="toggleCode('M000330-source');return false;">[Source]</a></p>
1091
+ <div class="method-source-code" id="M000330-source">
1092
+ <pre>
1093
+ /*
1094
+ * call-seq:
1095
+ * document.root -&gt; node
1096
+ *
1097
+ * Obtain the root node.
1098
+ */
1099
+ VALUE
1100
+ ruby_xml_document_root_get(VALUE self) {
1101
+
1102
+ </pre>
1103
+ </div>
1104
+ </div>
1105
+ </div>
1106
+
1107
+ <div id="method-M000331" class="method-detail">
1108
+ <a name="M000331"></a>
1109
+
1110
+ <div class="method-heading">
1111
+ <a href="#M000331" class="method-signature">
1112
+ <span class="method-name">document.root = node<br />
1113
+ </span>
1114
+ </a>
1115
+ </div>
1116
+
1117
+ <div class="method-description">
1118
+ <p>
1119
+ Set the root node.
1120
+ </p>
1121
+ <p><a class="source-toggle" href="#"
1122
+ onclick="toggleCode('M000331-source');return false;">[Source]</a></p>
1123
+ <div class="method-source-code" id="M000331-source">
1124
+ <pre>
1125
+ /*
1126
+ * call-seq:
1127
+ * document.root = node
1128
+ *
1129
+ * Set the root node.
1130
+ */
1131
+ VALUE
1132
+ ruby_xml_document_root_set(VALUE self, VALUE node) {
1133
+
1134
+ </pre>
1135
+ </div>
1136
+ </div>
1137
+ </div>
1138
+
1139
+ <div id="method-M000332" class="method-detail">
1140
+ <a name="M000332"></a>
1141
+
1142
+ <div class="method-heading">
1143
+ <a href="#M000332" class="method-signature">
1144
+ <span class="method-name">document.save(format = false)<br />
1145
+ </span>
1146
+ </a>
1147
+ </div>
1148
+
1149
+ <div class="method-description">
1150
+ <p>
1151
+ Save this document to the file given by filename, optionally formatting the
1152
+ output.
1153
+ </p>
1154
+ <p><a class="source-toggle" href="#"
1155
+ onclick="toggleCode('M000332-source');return false;">[Source]</a></p>
1156
+ <div class="method-source-code" id="M000332-source">
1157
+ <pre>
1158
+ /*
1159
+ * call-seq:
1160
+ * document.save(format = false)
1161
+ *
1162
+ * Save this document to the file given by filename,
1163
+ * optionally formatting the output.
1164
+ */
1165
+ VALUE
1166
+ ruby_xml_document_save(int argc, VALUE *argv, VALUE self) {
1167
+
1168
+ </pre>
1169
+ </div>
1170
+ </div>
1171
+ </div>
1172
+
1173
+ <div id="method-M000333" class="method-detail">
1174
+ <a name="M000333"></a>
1175
+
1176
+ <div class="method-heading">
1177
+ <a href="#M000333" class="method-signature">
1178
+ <span class="method-name">document.standalone? &rarr; (true|false)<br />
1179
+ </span>
1180
+ </a>
1181
+ </div>
1182
+
1183
+ <div class="method-description">
1184
+ <p>
1185
+ Determine whether this is a standalone document.
1186
+ </p>
1187
+ <p><a class="source-toggle" href="#"
1188
+ onclick="toggleCode('M000333-source');return false;">[Source]</a></p>
1189
+ <div class="method-source-code" id="M000333-source">
1190
+ <pre>
1191
+ /*
1192
+ * call-seq:
1193
+ * document.standalone? -&gt; (true|false)
1194
+ *
1195
+ * Determine whether this is a standalone document.
1196
+ */
1197
+ VALUE
1198
+ ruby_xml_document_standalone_q(VALUE self) {
1199
+
1200
+ </pre>
1201
+ </div>
1202
+ </div>
1203
+ </div>
1204
+
1205
+ <div id="method-M000334" class="method-detail">
1206
+ <a name="M000334"></a>
1207
+
1208
+ <div class="method-heading">
1209
+ <a href="#M000334" class="method-signature">
1210
+ <span class="method-name">document.to_s({format=true,encoding) &rarr; "xml"<br />
1211
+ </span>
1212
+ </a>
1213
+ </div>
1214
+
1215
+ <div class="method-description">
1216
+ <p>
1217
+ Coerce this document to a string representation of it&#8217;s <a
1218
+ href="../XML.html">XML</a>. The default is to pretty format, but this
1219
+ depends <a href="Parser.html#M000045">Parser#indent_tree_output</a>==true
1220
+ or <a href="Parser.html#M000027">Parser#default_keep_blanks</a>==false.
1221
+ </p>
1222
+ <p>
1223
+ The encoding is not applied to the document, but is encoding target of the
1224
+ resulting string.
1225
+ </p>
1226
+ <p><a class="source-toggle" href="#"
1227
+ onclick="toggleCode('M000334-source');return false;">[Source]</a></p>
1228
+ <div class="method-source-code" id="M000334-source">
1229
+ <pre>
1230
+ /*
1231
+ * call-seq:
1232
+ * document.to_s({format=true,encoding) -&gt; &quot;xml&quot;
1233
+ *
1234
+ * Coerce this document to a string representation
1235
+ * of it's XML. The default is to pretty format, but this
1236
+ * depends Parser#indent_tree_output==true or
1237
+ * Parser#default_keep_blanks==false.
1238
+ *
1239
+ * The encoding is not applied to the document, but is
1240
+ * encoding target of the resulting string.
1241
+ */
1242
+ VALUE
1243
+ ruby_xml_document_to_s(int argc, VALUE *argv, VALUE self) {
1244
+
1245
+ </pre>
1246
+ </div>
1247
+ </div>
1248
+ </div>
1249
+
1250
+ <div id="method-M000335" class="method-detail">
1251
+ <a name="M000335"></a>
1252
+
1253
+ <div class="method-heading">
1254
+ <a href="#M000335" class="method-signature">
1255
+ <span class="method-name">document.url &rarr; "url"<br />
1256
+ </span>
1257
+ </a>
1258
+ </div>
1259
+
1260
+ <div class="method-description">
1261
+ <p>
1262
+ Obtain this document&#8217;s source URL, if any.
1263
+ </p>
1264
+ <p><a class="source-toggle" href="#"
1265
+ onclick="toggleCode('M000335-source');return false;">[Source]</a></p>
1266
+ <div class="method-source-code" id="M000335-source">
1267
+ <pre>
1268
+ /*
1269
+ * call-seq:
1270
+ * document.url -&gt; &quot;url&quot;
1271
+ *
1272
+ * Obtain this document's source URL, if any.
1273
+ */
1274
+ VALUE
1275
+ ruby_xml_document_url_get(VALUE self) {
1276
+
1277
+ </pre>
1278
+ </div>
1279
+ </div>
1280
+ </div>
1281
+
1282
+ <div id="method-M000338" class="method-detail">
1283
+ <a name="M000338"></a>
1284
+
1285
+ <div class="method-heading">
1286
+ <a href="#M000338" class="method-signature">
1287
+ <span class="method-name">document.validate(dtd) &rarr; (true|false)<br />
1288
+ </span>
1289
+ </a>
1290
+ </div>
1291
+
1292
+ <div class="method-description">
1293
+ <p>
1294
+ Validate this document against the specified XML::DTD.
1295
+ </p>
1296
+ <p><a class="source-toggle" href="#"
1297
+ onclick="toggleCode('M000338-source');return false;">[Source]</a></p>
1298
+ <div class="method-source-code" id="M000338-source">
1299
+ <pre>
1300
+ /*
1301
+ * call-seq:
1302
+ * document.validate(dtd) -&gt; (true|false)
1303
+ *
1304
+ * Validate this document against the specified XML::DTD.
1305
+ */
1306
+ VALUE
1307
+ ruby_xml_document_validate_dtd(VALUE self, VALUE dtd) {
1308
+
1309
+ </pre>
1310
+ </div>
1311
+ </div>
1312
+ </div>
1313
+
1314
+ <div id="method-M000339" class="method-detail">
1315
+ <a name="M000339"></a>
1316
+
1317
+ <div class="method-heading">
1318
+ <a href="#M000339" class="method-signature">
1319
+ <span class="method-name">document.validate_schema(schema) &rarr; (true|false)<br />
1320
+ </span>
1321
+ </a>
1322
+ </div>
1323
+
1324
+ <div class="method-description">
1325
+ <p>
1326
+ Validate this document against the specified XML::Schema.
1327
+ </p>
1328
+ <p><a class="source-toggle" href="#"
1329
+ onclick="toggleCode('M000339-source');return false;">[Source]</a></p>
1330
+ <div class="method-source-code" id="M000339-source">
1331
+ <pre>
1332
+ /*
1333
+ * call-seq:
1334
+ * document.validate_schema(schema) -&gt; (true|false)
1335
+ *
1336
+ * Validate this document against the specified XML::Schema.
1337
+ */
1338
+ VALUE
1339
+ ruby_xml_document_validate_schema(VALUE self, VALUE schema) {
1340
+
1341
+ </pre>
1342
+ </div>
1343
+ </div>
1344
+ </div>
1345
+
1346
+ <div id="method-M000336" class="method-detail">
1347
+ <a name="M000336"></a>
1348
+
1349
+ <div class="method-heading">
1350
+ <a href="#M000336" class="method-signature">
1351
+ <span class="method-name">document.version &rarr; "version"<br />
1352
+ </span>
1353
+ </a>
1354
+ </div>
1355
+
1356
+ <div class="method-description">
1357
+ <p>
1358
+ Obtain the <a href="../XML.html">XML</a> version specified by this
1359
+ document.
1360
+ </p>
1361
+ <p><a class="source-toggle" href="#"
1362
+ onclick="toggleCode('M000336-source');return false;">[Source]</a></p>
1363
+ <div class="method-source-code" id="M000336-source">
1364
+ <pre>
1365
+ /*
1366
+ * call-seq:
1367
+ * document.version -&gt; &quot;version&quot;
1368
+ *
1369
+ * Obtain the XML version specified by this document.
1370
+ */
1371
+ VALUE
1372
+ ruby_xml_document_version_get(VALUE self) {
1373
+
1374
+ </pre>
1375
+ </div>
1376
+ </div>
1377
+ </div>
1378
+
1379
+ <div id="method-M000337" class="method-detail">
1380
+ <a name="M000337"></a>
1381
+
1382
+ <div class="method-heading">
1383
+ <a href="#M000337" class="method-signature">
1384
+ <span class="method-name">document.xinclude &rarr; num<br />
1385
+ </span>
1386
+ </a>
1387
+ </div>
1388
+
1389
+ <div class="method-description">
1390
+ <p>
1391
+ Process xinclude directives in this document.
1392
+ </p>
1393
+ <p><a class="source-toggle" href="#"
1394
+ onclick="toggleCode('M000337-source');return false;">[Source]</a></p>
1395
+ <div class="method-source-code" id="M000337-source">
1396
+ <pre>
1397
+ /*
1398
+ * call-seq:
1399
+ * document.xinclude -&gt; num
1400
+ *
1401
+ * Process xinclude directives in this document.
1402
+ */
1403
+ VALUE
1404
+ ruby_xml_document_xinclude(VALUE self) {
1405
+
1406
+ </pre>
1407
+ </div>
1408
+ </div>
1409
+ </div>
1410
+
1411
+
1412
+ </div>
1413
+
1414
+
1415
+ </div>
1416
+
1417
+
1418
+ <div id="validator-badges">
1419
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
1420
+ </div>
1421
+
1422
+ </body>
1423
+ </html>