libxml-ruby 0.8.3 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. data/CHANGES +18 -0
  2. data/RAKEFILE +15 -39
  3. data/README +48 -47
  4. data/ext/libxml/libxml.c +847 -22
  5. data/ext/libxml/ruby_libxml.h +71 -95
  6. data/ext/libxml/ruby_xml_attr.c +500 -500
  7. data/ext/libxml/ruby_xml_attributes.c +1 -1
  8. data/ext/libxml/ruby_xml_document.c +1144 -1135
  9. data/ext/libxml/ruby_xml_document.h +4 -11
  10. data/ext/libxml/ruby_xml_dtd.c +27 -0
  11. data/ext/libxml/ruby_xml_encoding.c +164 -0
  12. data/ext/libxml/ruby_xml_encoding.h +13 -0
  13. data/ext/libxml/ruby_xml_error.c +941 -0
  14. data/ext/libxml/ruby_xml_error.h +13 -0
  15. data/ext/libxml/ruby_xml_html_parser.c +71 -387
  16. data/ext/libxml/ruby_xml_html_parser.h +1 -17
  17. data/ext/libxml/ruby_xml_input.c +179 -0
  18. data/ext/libxml/ruby_xml_input.h +18 -0
  19. data/ext/libxml/ruby_xml_input_cbg.c +17 -3
  20. data/ext/libxml/ruby_xml_node.c +1566 -1582
  21. data/ext/libxml/ruby_xml_node.h +1 -4
  22. data/ext/libxml/ruby_xml_ns.c +14 -3
  23. data/ext/libxml/ruby_xml_parser.c +164 -1398
  24. data/ext/libxml/ruby_xml_parser.h +5 -17
  25. data/ext/libxml/ruby_xml_parser_context.c +131 -169
  26. data/ext/libxml/ruby_xml_parser_context.h +2 -9
  27. data/ext/libxml/ruby_xml_reader.c +910 -945
  28. data/ext/libxml/ruby_xml_relaxng.c +32 -3
  29. data/ext/libxml/ruby_xml_sax_parser.c +106 -364
  30. data/ext/libxml/ruby_xml_sax_parser.h +1 -37
  31. data/ext/libxml/ruby_xml_schema.c +174 -145
  32. data/ext/libxml/ruby_xml_xinclude.c +9 -5
  33. data/ext/libxml/ruby_xml_xpath.c +25 -6
  34. data/ext/libxml/ruby_xml_xpath.h +1 -2
  35. data/ext/libxml/ruby_xml_xpath_context.c +17 -19
  36. data/ext/libxml/ruby_xml_xpath_object.c +60 -56
  37. data/ext/libxml/ruby_xml_xpointer.c +11 -5
  38. data/ext/libxml/sax_parser_callbacks.inc +42 -37
  39. data/ext/libxml/version.h +3 -3
  40. data/ext/mingw/Rakefile +20 -27
  41. data/ext/mingw/build.rake +41 -0
  42. data/ext/vc/libxml_ruby.vcproj +23 -15
  43. data/lib/libxml.rb +8 -2
  44. data/lib/libxml/document.rb +16 -4
  45. data/lib/libxml/error.rb +84 -0
  46. data/lib/libxml/hpricot.rb +76 -0
  47. data/lib/libxml/html_parser.rb +61 -0
  48. data/lib/libxml/node.rb +36 -25
  49. data/lib/libxml/parser.rb +312 -33
  50. data/lib/libxml/parser_context.rb +17 -0
  51. data/lib/libxml/properties.rb +15 -2
  52. data/lib/libxml/reader.rb +15 -0
  53. data/lib/libxml/sax_callbacks.rb +179 -0
  54. data/lib/libxml/sax_parser.rb +42 -0
  55. data/lib/libxml/tree.rb +1 -2
  56. data/lib/libxml/xpath_object.rb +12 -0
  57. data/test/model/atom.xml +4 -0
  58. data/test/tc_attributes.rb +43 -19
  59. data/test/tc_document.rb +1 -1
  60. data/test/tc_document_write.rb +15 -8
  61. data/test/tc_dtd.rb +36 -20
  62. data/test/tc_encoding.rb +13 -0
  63. data/test/tc_error.rb +136 -0
  64. data/test/tc_node.rb +2 -3
  65. data/test/tc_node_copy.rb +1 -1
  66. data/test/tc_node_edit.rb +6 -0
  67. data/test/tc_ns.rb +18 -0
  68. data/test/tc_parser.rb +113 -228
  69. data/test/tc_parser_context.rb +1 -2
  70. data/test/tc_reader.rb +24 -14
  71. data/test/tc_relaxng.rb +18 -6
  72. data/test/tc_sax_parser.rb +48 -13
  73. data/test/tc_schema.rb +20 -8
  74. data/test/tc_well_formed.rb +2 -1
  75. data/test/tc_xml.rb +212 -0
  76. data/test/tc_xpath.rb +60 -46
  77. data/test/tc_xpointer.rb +7 -11
  78. data/test/test_suite.rb +4 -3
  79. metadata +26 -109
  80. data/doc/rdoc/classes/LibXML.html +0 -241
  81. data/doc/rdoc/classes/LibXML/XML.html +0 -185
  82. data/doc/rdoc/classes/LibXML/XML/Attr.html +0 -1010
  83. data/doc/rdoc/classes/LibXML/XML/Attributes.html +0 -526
  84. data/doc/rdoc/classes/LibXML/XML/Document.html +0 -1489
  85. data/doc/rdoc/classes/LibXML/XML/Dtd.html +0 -213
  86. data/doc/rdoc/classes/LibXML/XML/Error.html +0 -117
  87. data/doc/rdoc/classes/LibXML/XML/HTMLParser.html +0 -348
  88. data/doc/rdoc/classes/LibXML/XML/InputCallbacks.html +0 -160
  89. data/doc/rdoc/classes/LibXML/XML/NS.html +0 -381
  90. data/doc/rdoc/classes/LibXML/XML/Node.html +0 -3396
  91. data/doc/rdoc/classes/LibXML/XML/Node/FailedModify.html +0 -123
  92. data/doc/rdoc/classes/LibXML/XML/Node/Set.html +0 -440
  93. data/doc/rdoc/classes/LibXML/XML/Node/SetNamespace.html +0 -123
  94. data/doc/rdoc/classes/LibXML/XML/Node/UnknownType.html +0 -123
  95. data/doc/rdoc/classes/LibXML/XML/Parser.html +0 -2239
  96. data/doc/rdoc/classes/LibXML/XML/Parser/Context.html +0 -1255
  97. data/doc/rdoc/classes/LibXML/XML/Parser/ParseError.html +0 -123
  98. data/doc/rdoc/classes/LibXML/XML/Reader.html +0 -2264
  99. data/doc/rdoc/classes/LibXML/XML/RelaxNG.html +0 -237
  100. data/doc/rdoc/classes/LibXML/XML/SaxParser.html +0 -415
  101. data/doc/rdoc/classes/LibXML/XML/Schema.html +0 -308
  102. data/doc/rdoc/classes/LibXML/XML/State.html +0 -124
  103. data/doc/rdoc/classes/LibXML/XML/Tree.html +0 -111
  104. data/doc/rdoc/classes/LibXML/XML/XInclude.html +0 -123
  105. data/doc/rdoc/classes/LibXML/XML/XInclude/Error.html +0 -117
  106. data/doc/rdoc/classes/LibXML/XML/XMLParserOptions.html +0 -198
  107. data/doc/rdoc/classes/LibXML/XML/XPath.html +0 -184
  108. data/doc/rdoc/classes/LibXML/XML/XPath/Context.html +0 -404
  109. data/doc/rdoc/classes/LibXML/XML/XPath/InvalidPath.html +0 -172
  110. data/doc/rdoc/classes/LibXML/XML/XPath/Object.html +0 -627
  111. data/doc/rdoc/classes/LibXML/XML/XPointer.html +0 -170
  112. data/doc/rdoc/classes/LibXML/XML/XPointer/Context.html +0 -123
  113. data/doc/rdoc/classes/LibXML/XML/XPointer/Context/InvalidPath.html +0 -117
  114. data/doc/rdoc/classes/LibXML/XML/XPointer/InvalidExpression.html +0 -124
  115. data/doc/rdoc/classes/singleton.html +0 -114
  116. data/doc/rdoc/created.rid +0 -1
  117. data/doc/rdoc/files/CHANGES.html +0 -442
  118. data/doc/rdoc/files/LICENSE.html +0 -133
  119. data/doc/rdoc/files/README.html +0 -388
  120. data/doc/rdoc/files/VERSION.html +0 -107
  121. data/doc/rdoc/files/ext/libxml/cbg_c.html +0 -101
  122. data/doc/rdoc/files/ext/libxml/libxml_c.html +0 -101
  123. data/doc/rdoc/files/ext/libxml/ruby_xml_attr_c.html +0 -101
  124. data/doc/rdoc/files/ext/libxml/ruby_xml_attributes_c.html +0 -101
  125. data/doc/rdoc/files/ext/libxml/ruby_xml_document_c.html +0 -101
  126. data/doc/rdoc/files/ext/libxml/ruby_xml_dtd_c.html +0 -101
  127. data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_c.html +0 -101
  128. data/doc/rdoc/files/ext/libxml/ruby_xml_input_cbg_c.html +0 -101
  129. data/doc/rdoc/files/ext/libxml/ruby_xml_node_c.html +0 -101
  130. data/doc/rdoc/files/ext/libxml/ruby_xml_node_set_c.html +0 -101
  131. data/doc/rdoc/files/ext/libxml/ruby_xml_ns_c.html +0 -101
  132. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_c.html +0 -101
  133. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_context_c.html +0 -101
  134. data/doc/rdoc/files/ext/libxml/ruby_xml_reader_c.html +0 -101
  135. data/doc/rdoc/files/ext/libxml/ruby_xml_relaxng_c.html +0 -101
  136. data/doc/rdoc/files/ext/libxml/ruby_xml_sax_parser_c.html +0 -101
  137. data/doc/rdoc/files/ext/libxml/ruby_xml_schema_c.html +0 -101
  138. data/doc/rdoc/files/ext/libxml/ruby_xml_state_c.html +0 -101
  139. data/doc/rdoc/files/ext/libxml/ruby_xml_xinclude_c.html +0 -101
  140. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_c.html +0 -101
  141. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_context_c.html +0 -101
  142. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_object_c.html +0 -101
  143. data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_c.html +0 -101
  144. data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_context_c.html +0 -101
  145. data/doc/rdoc/files/lib/libxml/attr_rb.html +0 -108
  146. data/doc/rdoc/files/lib/libxml/attributes_rb.html +0 -108
  147. data/doc/rdoc/files/lib/libxml/document_rb.html +0 -108
  148. data/doc/rdoc/files/lib/libxml/node_rb.html +0 -108
  149. data/doc/rdoc/files/lib/libxml/node_set_rb.html +0 -108
  150. data/doc/rdoc/files/lib/libxml/parser_options_rb.html +0 -107
  151. data/doc/rdoc/files/lib/libxml/parser_rb.html +0 -101
  152. data/doc/rdoc/files/lib/libxml/properties_rb.html +0 -108
  153. data/doc/rdoc/files/lib/libxml/tree_rb.html +0 -107
  154. data/doc/rdoc/files/lib/libxml_rb.html +0 -124
  155. data/doc/rdoc/files/lib/xml/libxml_rb.html +0 -124
  156. data/doc/rdoc/files/lib/xml_rb.html +0 -134
  157. data/doc/rdoc/fr_class_index.html +0 -62
  158. data/doc/rdoc/fr_file_index.html +0 -66
  159. data/doc/rdoc/fr_method_index.html +0 -392
  160. data/doc/rdoc/index.html +0 -24
  161. data/doc/rdoc/rdoc-style.css +0 -208
  162. data/ext/libxml/ruby_xml_node_set.c +0 -172
  163. data/ext/libxml/ruby_xml_node_set.h +0 -20
  164. data/ext/libxml/ruby_xml_xpointer_context.c +0 -22
  165. data/ext/libxml/ruby_xml_xpointer_context.h +0 -18
  166. data/lib/libxml/node_set.rb +0 -27
  167. data/test/tc_node_set.rb +0 -24
  168. data/test/tc_node_set2.rb +0 -37
@@ -1,3396 +0,0 @@
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: LibXML::XML::Node</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">LibXML::XML::Node</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/node_rb.html">
63
- lib/libxml/node.rb
64
- </a>
65
- <br />
66
- <a href="../../../files/lib/libxml/node_set_rb.html">
67
- lib/libxml/node_set.rb
68
- </a>
69
- <br />
70
- <a href="../../../files/lib/libxml/properties_rb.html">
71
- lib/libxml/properties.rb
72
- </a>
73
- <br />
74
- </td>
75
- </tr>
76
-
77
- <tr class="top-aligned-row">
78
- <td><strong>Parent:</strong></td>
79
- <td>
80
- Object
81
- </td>
82
- </tr>
83
- </table>
84
- </div>
85
- <!-- banner header -->
86
-
87
- <div id="bodyContent">
88
-
89
-
90
-
91
- <div id="contextContent">
92
-
93
- <div id="description">
94
- <p>
95
- call-seq:
96
- </p>
97
- <pre>
98
- nodeset.xpath_ctxt -&gt; context
99
- </pre>
100
- <p>
101
- Return the xpath context corresponding to this nodeset, if any.
102
- </p>
103
-
104
- </div>
105
-
106
-
107
- </div>
108
-
109
- <div id="method-list">
110
- <h3 class="section-bar">Methods</h3>
111
-
112
- <div class="name-list">
113
- <a href="#M000125">&lt;&lt;</a>&nbsp;&nbsp;
114
- <a href="#M000169">==</a>&nbsp;&nbsp;
115
- <a href="#M000118">[]</a>&nbsp;&nbsp;
116
- <a href="#M000126">[]=</a>&nbsp;&nbsp;
117
- <a href="#M000184">attribute?</a>&nbsp;&nbsp;
118
- <a href="#M000185">attribute_decl?</a>&nbsp;&nbsp;
119
- <a href="#M000132">attributes</a>&nbsp;&nbsp;
120
- <a href="#M000170">attributes?</a>&nbsp;&nbsp;
121
- <a href="#M000133">base</a>&nbsp;&nbsp;
122
- <a href="#M000134">base=</a>&nbsp;&nbsp;
123
- <a href="#M000135">blank?</a>&nbsp;&nbsp;
124
- <a href="#M000186">cdata?</a>&nbsp;&nbsp;
125
- <a href="#M000206">child</a>&nbsp;&nbsp;
126
- <a href="#M000128">child=</a>&nbsp;&nbsp;
127
- <a href="#M000204">child?</a>&nbsp;&nbsp;
128
- <a href="#M000127">child_add</a>&nbsp;&nbsp;
129
- <a href="#M000179">children</a>&nbsp;&nbsp;
130
- <a href="#M000205">children?</a>&nbsp;&nbsp;
131
- <a href="#M000171">clone</a>&nbsp;&nbsp;
132
- <a href="#M000187">comment?</a>&nbsp;&nbsp;
133
- <a href="#M000137">content</a>&nbsp;&nbsp;
134
- <a href="#M000138">content=</a>&nbsp;&nbsp;
135
- <a href="#M000139">content_stripped</a>&nbsp;&nbsp;
136
- <a href="#M000136">copy</a>&nbsp;&nbsp;
137
- <a href="#M000142">debug_dump</a>&nbsp;&nbsp;
138
- <a href="#M000140">doc</a>&nbsp;&nbsp;
139
- <a href="#M000188">docbook_doc?</a>&nbsp;&nbsp;
140
- <a href="#M000189">doctype?</a>&nbsp;&nbsp;
141
- <a href="#M000190">document?</a>&nbsp;&nbsp;
142
- <a href="#M000191">dtd?</a>&nbsp;&nbsp;
143
- <a href="#M000141">dump</a>&nbsp;&nbsp;
144
- <a href="#M000172">dup</a>&nbsp;&nbsp;
145
- <a href="#M000119">each</a>&nbsp;&nbsp;
146
- <a href="#M000175">each_attr</a>&nbsp;&nbsp;
147
- <a href="#M000207">each_child</a>&nbsp;&nbsp;
148
- <a href="#M000176">each_element</a>&nbsp;&nbsp;
149
- <a href="#M000192">element?</a>&nbsp;&nbsp;
150
- <a href="#M000194">element_decl?</a>&nbsp;&nbsp;
151
- <a href="#M000143">empty?</a>&nbsp;&nbsp;
152
- <a href="#M000193">entity?</a>&nbsp;&nbsp;
153
- <a href="#M000195">entity_ref?</a>&nbsp;&nbsp;
154
- <a href="#M000144">eql?</a>&nbsp;&nbsp;
155
- <a href="#M000173">find</a>&nbsp;&nbsp;
156
- <a href="#M000174">find_first</a>&nbsp;&nbsp;
157
- <a href="#M000120">first</a>&nbsp;&nbsp;
158
- <a href="#M000178">first?</a>&nbsp;&nbsp;
159
- <a href="#M000196">fragment?</a>&nbsp;&nbsp;
160
- <a href="#M000197">html_doc?</a>&nbsp;&nbsp;
161
- <a href="#M000145">lang</a>&nbsp;&nbsp;
162
- <a href="#M000146">lang=</a>&nbsp;&nbsp;
163
- <a href="#M000121">last</a>&nbsp;&nbsp;
164
- <a href="#M000182">last?</a>&nbsp;&nbsp;
165
- <a href="#M000147">line_num</a>&nbsp;&nbsp;
166
- <a href="#M000148">name</a>&nbsp;&nbsp;
167
- <a href="#M000149">name=</a>&nbsp;&nbsp;
168
- <a href="#M000150">namespace</a>&nbsp;&nbsp;
169
- <a href="#M000152">namespace=</a>&nbsp;&nbsp;
170
- <a href="#M000198">namespace?</a>&nbsp;&nbsp;
171
- <a href="#M000151">namespace_node</a>&nbsp;&nbsp;
172
- <a href="#M000114">new</a>&nbsp;&nbsp;
173
- <a href="#M000115">new_cdata</a>&nbsp;&nbsp;
174
- <a href="#M000116">new_comment</a>&nbsp;&nbsp;
175
- <a href="#M000117">new_text</a>&nbsp;&nbsp;
176
- <a href="#M000122">next</a>&nbsp;&nbsp;
177
- <a href="#M000130">next=</a>&nbsp;&nbsp;
178
- <a href="#M000180">next?</a>&nbsp;&nbsp;
179
- <a href="#M000153">node_type</a>&nbsp;&nbsp;
180
- <a href="#M000183">node_type_name</a>&nbsp;&nbsp;
181
- <a href="#M000199">notation?</a>&nbsp;&nbsp;
182
- <a href="#M000154">ns</a>&nbsp;&nbsp;
183
- <a href="#M000155">ns?</a>&nbsp;&nbsp;
184
- <a href="#M000157">ns_def</a>&nbsp;&nbsp;
185
- <a href="#M000156">ns_def?</a>&nbsp;&nbsp;
186
- <a href="#M000123">parent</a>&nbsp;&nbsp;
187
- <a href="#M000177">parent?</a>&nbsp;&nbsp;
188
- <a href="#M000158">path</a>&nbsp;&nbsp;
189
- <a href="#M000200">pi?</a>&nbsp;&nbsp;
190
- <a href="#M000159">pointer</a>&nbsp;&nbsp;
191
- <a href="#M000124">prev</a>&nbsp;&nbsp;
192
- <a href="#M000131">prev=</a>&nbsp;&nbsp;
193
- <a href="#M000181">prev?</a>&nbsp;&nbsp;
194
- <a href="#M000208">properties</a>&nbsp;&nbsp;
195
- <a href="#M000209">properties?</a>&nbsp;&nbsp;
196
- <a href="#M000160">remove!</a>&nbsp;&nbsp;
197
- <a href="#M000162">search_href</a>&nbsp;&nbsp;
198
- <a href="#M000161">search_ns</a>&nbsp;&nbsp;
199
- <a href="#M000129">sibling=</a>&nbsp;&nbsp;
200
- <a href="#M000163">space_preserve</a>&nbsp;&nbsp;
201
- <a href="#M000164">space_preserve=</a>&nbsp;&nbsp;
202
- <a href="#M000201">text?</a>&nbsp;&nbsp;
203
- <a href="#M000165">to_s</a>&nbsp;&nbsp;
204
- <a href="#M000202">xinclude_end?</a>&nbsp;&nbsp;
205
- <a href="#M000203">xinclude_start?</a>&nbsp;&nbsp;
206
- <a href="#M000166">xlink?</a>&nbsp;&nbsp;
207
- <a href="#M000167">xlink_type</a>&nbsp;&nbsp;
208
- <a href="#M000168">xlink_type_name</a>&nbsp;&nbsp;
209
- </div>
210
- </div>
211
-
212
- </div>
213
-
214
-
215
- <!-- if includes -->
216
- <div id="includes">
217
- <h3 class="section-bar">Included Modules</h3>
218
-
219
- <div id="includes-list">
220
- <span class="include-name">Enumerable</span>
221
- </div>
222
- </div>
223
-
224
- <div id="section">
225
-
226
- <div id="class-list">
227
- <h3 class="section-bar">Classes and Modules</h3>
228
-
229
- Class <a href="Node/FailedModify.html" class="link">LibXML::XML::Node::FailedModify</a><br />
230
- Class <a href="Node/Set.html" class="link">LibXML::XML::Node::Set</a><br />
231
- Class <a href="Node/SetNamespace.html" class="link">LibXML::XML::Node::SetNamespace</a><br />
232
- Class <a href="Node/UnknownType.html" class="link">LibXML::XML::Node::UnknownType</a><br />
233
-
234
- </div>
235
-
236
- <div id="constants-list">
237
- <h3 class="section-bar">Constants</h3>
238
-
239
- <div class="name-list">
240
- <table summary="Constants">
241
- <tr class="top-aligned-row context-row">
242
- <td class="context-item-name">SPACE_DEFAULT</td>
243
- <td>=</td>
244
- <td class="context-item-value">INT2NUM(0)</td>
245
- </tr>
246
- <tr class="top-aligned-row context-row">
247
- <td class="context-item-name">SPACE_PRESERVE</td>
248
- <td>=</td>
249
- <td class="context-item-value">INT2NUM(1)</td>
250
- </tr>
251
- <tr class="top-aligned-row context-row">
252
- <td class="context-item-name">SPACE_NOT_INHERIT</td>
253
- <td>=</td>
254
- <td class="context-item-value">INT2NUM(-1)</td>
255
- </tr>
256
- <tr class="top-aligned-row context-row">
257
- <td class="context-item-name">XLINK_ACTUATE_AUTO</td>
258
- <td>=</td>
259
- <td class="context-item-value">INT2NUM(1)</td>
260
- </tr>
261
- <tr class="top-aligned-row context-row">
262
- <td class="context-item-name">XLINK_ACTUATE_NONE</td>
263
- <td>=</td>
264
- <td class="context-item-value">INT2NUM(0)</td>
265
- </tr>
266
- <tr class="top-aligned-row context-row">
267
- <td class="context-item-name">XLINK_ACTUATE_ONREQUEST</td>
268
- <td>=</td>
269
- <td class="context-item-value">INT2NUM(2)</td>
270
- </tr>
271
- <tr class="top-aligned-row context-row">
272
- <td class="context-item-name">XLINK_SHOW_EMBED</td>
273
- <td>=</td>
274
- <td class="context-item-value">INT2NUM(2)</td>
275
- </tr>
276
- <tr class="top-aligned-row context-row">
277
- <td class="context-item-name">XLINK_SHOW_NEW</td>
278
- <td>=</td>
279
- <td class="context-item-value">INT2NUM(1)</td>
280
- </tr>
281
- <tr class="top-aligned-row context-row">
282
- <td class="context-item-name">XLINK_SHOW_NONE</td>
283
- <td>=</td>
284
- <td class="context-item-value">INT2NUM(0)</td>
285
- </tr>
286
- <tr class="top-aligned-row context-row">
287
- <td class="context-item-name">XLINK_SHOW_REPLACE</td>
288
- <td>=</td>
289
- <td class="context-item-value">INT2NUM(3)</td>
290
- </tr>
291
- <tr class="top-aligned-row context-row">
292
- <td class="context-item-name">XLINK_TYPE_EXTENDED</td>
293
- <td>=</td>
294
- <td class="context-item-value">INT2NUM(2)</td>
295
- </tr>
296
- <tr class="top-aligned-row context-row">
297
- <td class="context-item-name">XLINK_TYPE_EXTENDED_SET</td>
298
- <td>=</td>
299
- <td class="context-item-value">INT2NUM(3)</td>
300
- </tr>
301
- <tr class="top-aligned-row context-row">
302
- <td class="context-item-name">XLINK_TYPE_NONE</td>
303
- <td>=</td>
304
- <td class="context-item-value">INT2NUM(0)</td>
305
- </tr>
306
- <tr class="top-aligned-row context-row">
307
- <td class="context-item-name">XLINK_TYPE_SIMPLE</td>
308
- <td>=</td>
309
- <td class="context-item-value">INT2NUM(1)</td>
310
- </tr>
311
- <tr class="top-aligned-row context-row">
312
- <td class="context-item-name">ELEMENT_NODE</td>
313
- <td>=</td>
314
- <td class="context-item-value">INT2FIX(XML_ELEMENT_NODE)</td>
315
- </tr>
316
- <tr class="top-aligned-row context-row">
317
- <td class="context-item-name">ATTRIBUTE_NODE</td>
318
- <td>=</td>
319
- <td class="context-item-value">INT2FIX(XML_ATTRIBUTE_NODE)</td>
320
- </tr>
321
- <tr class="top-aligned-row context-row">
322
- <td class="context-item-name">TEXT_NODE</td>
323
- <td>=</td>
324
- <td class="context-item-value">INT2FIX(XML_TEXT_NODE)</td>
325
- </tr>
326
- <tr class="top-aligned-row context-row">
327
- <td class="context-item-name">CDATA_SECTION_NODE</td>
328
- <td>=</td>
329
- <td class="context-item-value">INT2FIX(XML_CDATA_SECTION_NODE)</td>
330
- </tr>
331
- <tr class="top-aligned-row context-row">
332
- <td class="context-item-name">ENTITY_REF_NODE</td>
333
- <td>=</td>
334
- <td class="context-item-value">INT2FIX(XML_ENTITY_REF_NODE)</td>
335
- </tr>
336
- <tr class="top-aligned-row context-row">
337
- <td class="context-item-name">ENTITY_NODE</td>
338
- <td>=</td>
339
- <td class="context-item-value">INT2FIX(XML_ENTITY_NODE)</td>
340
- </tr>
341
- <tr class="top-aligned-row context-row">
342
- <td class="context-item-name">PI_NODE</td>
343
- <td>=</td>
344
- <td class="context-item-value">INT2FIX(XML_PI_NODE)</td>
345
- </tr>
346
- <tr class="top-aligned-row context-row">
347
- <td class="context-item-name">COMMENT_NODE</td>
348
- <td>=</td>
349
- <td class="context-item-value">INT2FIX(XML_COMMENT_NODE)</td>
350
- </tr>
351
- <tr class="top-aligned-row context-row">
352
- <td class="context-item-name">DOCUMENT_NODE</td>
353
- <td>=</td>
354
- <td class="context-item-value">INT2FIX(XML_DOCUMENT_NODE)</td>
355
- </tr>
356
- <tr class="top-aligned-row context-row">
357
- <td class="context-item-name">DOCUMENT_TYPE_NODE</td>
358
- <td>=</td>
359
- <td class="context-item-value">INT2FIX(XML_DOCUMENT_TYPE_NODE)</td>
360
- </tr>
361
- <tr class="top-aligned-row context-row">
362
- <td class="context-item-name">DOCUMENT_FRAG_NODE</td>
363
- <td>=</td>
364
- <td class="context-item-value">INT2FIX(XML_DOCUMENT_FRAG_NODE)</td>
365
- </tr>
366
- <tr class="top-aligned-row context-row">
367
- <td class="context-item-name">NOTATION_NODE</td>
368
- <td>=</td>
369
- <td class="context-item-value">INT2FIX(XML_NOTATION_NODE)</td>
370
- </tr>
371
- <tr class="top-aligned-row context-row">
372
- <td class="context-item-name">HTML_DOCUMENT_NODE</td>
373
- <td>=</td>
374
- <td class="context-item-value">INT2FIX(XML_HTML_DOCUMENT_NODE)</td>
375
- </tr>
376
- <tr class="top-aligned-row context-row">
377
- <td class="context-item-name">DTD_NODE</td>
378
- <td>=</td>
379
- <td class="context-item-value">INT2FIX(XML_DTD_NODE)</td>
380
- </tr>
381
- <tr class="top-aligned-row context-row">
382
- <td class="context-item-name">ELEMENT_DECL</td>
383
- <td>=</td>
384
- <td class="context-item-value">INT2FIX(XML_ELEMENT_DECL)</td>
385
- </tr>
386
- <tr class="top-aligned-row context-row">
387
- <td class="context-item-name">ATTRIBUTE_DECL</td>
388
- <td>=</td>
389
- <td class="context-item-value">INT2FIX(XML_ATTRIBUTE_DECL)</td>
390
- </tr>
391
- <tr class="top-aligned-row context-row">
392
- <td class="context-item-name">ENTITY_DECL</td>
393
- <td>=</td>
394
- <td class="context-item-value">INT2FIX(XML_ENTITY_DECL)</td>
395
- </tr>
396
- <tr class="top-aligned-row context-row">
397
- <td class="context-item-name">NAMESPACE_DECL</td>
398
- <td>=</td>
399
- <td class="context-item-value">INT2FIX(XML_NAMESPACE_DECL)</td>
400
- </tr>
401
- <tr class="top-aligned-row context-row">
402
- <td class="context-item-name">XINCLUDE_START</td>
403
- <td>=</td>
404
- <td class="context-item-value">INT2FIX(XML_XINCLUDE_START)</td>
405
- </tr>
406
- <tr class="top-aligned-row context-row">
407
- <td class="context-item-name">XINCLUDE_END</td>
408
- <td>=</td>
409
- <td class="context-item-value">INT2FIX(XML_XINCLUDE_END)</td>
410
- </tr>
411
- <tr class="top-aligned-row context-row">
412
- <td class="context-item-name">DOCB_DOCUMENT_NODE</td>
413
- <td>=</td>
414
- <td class="context-item-value">INT2FIX(XML_DOCB_DOCUMENT_NODE)</td>
415
- </tr>
416
- <tr class="top-aligned-row context-row">
417
- <td class="context-item-name">DOCB_DOCUMENT_NODE</td>
418
- <td>=</td>
419
- <td class="context-item-value">Qnil</td>
420
- </tr>
421
- </table>
422
- </div>
423
- </div>
424
-
425
-
426
-
427
-
428
-
429
-
430
- <!-- if method_list -->
431
- <div id="methods">
432
- <h3 class="section-bar">Public Class methods</h3>
433
-
434
- <div id="method-M000114" class="method-detail">
435
- <a name="M000114"></a>
436
-
437
- <div class="method-heading">
438
- <a href="#M000114" class="method-signature">
439
- <span class="method-name">XML::Node.new(name, content = nil) &rarr; XML::Node<br />
440
- XML::Node.new_element(name, content = nil) &rarr; XML::Node<br />
441
- </span>
442
- </a>
443
- </div>
444
-
445
- <div class="method-description">
446
- <p>
447
- Create a <a href="Node.html#M000114">new</a> element node with the
448
- specified <a href="Node.html#M000148">name</a>, optionally setting the
449
- node&#8216;s <a href="Node.html#M000137">content</a>. backward
450
- compatibility for &lt;.5 <a href="Node.html#M000114">new</a>
451
- </p>
452
- <p><a class="source-toggle" href="#"
453
- onclick="toggleCode('M000114-source');return false;">[Source]</a></p>
454
- <div class="method-source-code" id="M000114-source">
455
- <pre>
456
- /*
457
- * call-seq:
458
- * XML::Node.new(name, content = nil) -&gt; XML::Node
459
- * XML::Node.new_element(name, content = nil) -&gt; XML::Node
460
- *
461
- * Create a new element node with the specified name, optionally setting
462
- * the node's content.
463
- * backward compatibility for &lt;.5 new
464
- */
465
- VALUE
466
- ruby_xml_node2_new_string_bc(int argc, VALUE *argv, VALUE class)
467
- {
468
- VALUE content=Qnil;
469
- VALUE name=Qnil;
470
- switch(argc) {
471
- case 2:
472
- content=argv[1];
473
- if ( TYPE(content) != T_STRING)
474
- content=rb_obj_as_string(content);
475
-
476
- case 1:
477
- name=check_string_or_symbol( argv[0] );
478
- return ruby_xml_node2_new_string(class,Qnil,name,content);
479
-
480
- default:
481
- rb_raise(rb_eArgError, &quot;wrong number of arguments (1 or 2) given %d&quot;,argc);
482
- }
483
- }
484
- </pre>
485
- </div>
486
- </div>
487
- </div>
488
-
489
- <div id="method-M000115" class="method-detail">
490
- <a name="M000115"></a>
491
-
492
- <div class="method-heading">
493
- <a href="#M000115" class="method-signature">
494
- <span class="method-name">XML::Node.new_cdata(content = nil) &rarr; XML::Node<br />
495
- </span>
496
- </a>
497
- </div>
498
-
499
- <div class="method-description">
500
- <p>
501
- Create a <a href="Node.html#M000114">new</a> CDATA node, optionally setting
502
- the node&#8216;s <a href="Node.html#M000137">content</a>.
503
- </p>
504
- <p><a class="source-toggle" href="#"
505
- onclick="toggleCode('M000115-source');return false;">[Source]</a></p>
506
- <div class="method-source-code" id="M000115-source">
507
- <pre>
508
- /*
509
- * call-seq:
510
- * XML::Node.new_cdata(content = nil) -&gt; XML::Node
511
- *
512
- * Create a new #CDATA node, optionally setting
513
- * the node's content.
514
- */
515
- VALUE
516
- ruby_xml_node_new_cdata(int argc, VALUE *argv, VALUE class) {
517
-
518
- </pre>
519
- </div>
520
- </div>
521
- </div>
522
-
523
- <div id="method-M000116" class="method-detail">
524
- <a name="M000116"></a>
525
-
526
- <div class="method-heading">
527
- <a href="#M000116" class="method-signature">
528
- <span class="method-name">XML::Node.new_comment(content = nil) &rarr; XML::Node<br />
529
- </span>
530
- </a>
531
- </div>
532
-
533
- <div class="method-description">
534
- <p>
535
- Create a <a href="Node.html#M000114">new</a> comment node, optionally
536
- setting the node&#8216;s <a href="Node.html#M000137">content</a>.
537
- </p>
538
- <p><a class="source-toggle" href="#"
539
- onclick="toggleCode('M000116-source');return false;">[Source]</a></p>
540
- <div class="method-source-code" id="M000116-source">
541
- <pre>
542
- /*
543
- * call-seq:
544
- * XML::Node.new_comment(content = nil) -&gt; XML::Node
545
- *
546
- * Create a new comment node, optionally setting
547
- * the node's content.
548
- *
549
- */
550
- VALUE
551
- ruby_xml_node_new_comment(int argc, VALUE *argv, VALUE class) {
552
-
553
- </pre>
554
- </div>
555
- </div>
556
- </div>
557
-
558
- <div id="method-M000117" class="method-detail">
559
- <a name="M000117"></a>
560
-
561
- <div class="method-heading">
562
- <a href="#M000117" class="method-signature">
563
- <span class="method-name">XML::Node.new_text(content = nil) &rarr; XML::Node<br />
564
- </span>
565
- </a>
566
- </div>
567
-
568
- <div class="method-description">
569
- <p>
570
- Create a <a href="Node.html#M000114">new</a> text node, optionally setting
571
- the node&#8216;s <a href="Node.html#M000137">content</a>.
572
- </p>
573
- <p><a class="source-toggle" href="#"
574
- onclick="toggleCode('M000117-source');return false;">[Source]</a></p>
575
- <div class="method-source-code" id="M000117-source">
576
- <pre>
577
- /*
578
- * call-seq:
579
- * XML::Node.new_text(content = nil) -&gt; XML::Node
580
- *
581
- * Create a new text node, optionally setting
582
- * the node's content.
583
- *
584
- */
585
- VALUE
586
- ruby_xml_node_new_text(VALUE class, VALUE text)
587
- {
588
- VALUE obj;
589
- xmlNodePtr xnode;
590
-
591
- if ( NIL_P(text) )
592
- return Qnil;
593
-
594
- if (TYPE(text) != T_STRING )
595
- rb_raise(rb_eTypeError, &quot;requires string argument&quot;);
596
-
597
- xnode=xmlNewText((xmlChar*)STR2CSTR(text));
598
- if ( xnode == NULL )
599
- return Qnil;
600
-
601
- obj=ruby_xml_node2_wrap(class,xnode);
602
- rb_obj_call_init(obj,0,NULL);
603
- return obj;
604
- }
605
- </pre>
606
- </div>
607
- </div>
608
- </div>
609
-
610
- <h3 class="section-bar">Public Instance methods</h3>
611
-
612
- <div id="method-M000125" class="method-detail">
613
- <a name="M000125"></a>
614
-
615
- <div class="method-heading">
616
- <a href="#M000125" class="method-signature">
617
- <span class="method-name">node << ("string" | node) &rarr; XML::Node<br />
618
- </span>
619
- </a>
620
- </div>
621
-
622
- <div class="method-description">
623
- <p>
624
- Add the specified string or <a href="Node.html">XML::Node</a> to this
625
- node&#8216;s <a href="Node.html#M000137">content</a>.
626
- </p>
627
- <p><a class="source-toggle" href="#"
628
- onclick="toggleCode('M000125-source');return false;">[Source]</a></p>
629
- <div class="method-source-code" id="M000125-source">
630
- <pre>
631
- /*
632
- * call-seq:
633
- * node &lt;&lt; (&quot;string&quot; | node) -&gt; XML::Node
634
- *
635
- * Add the specified string or XML::Node to this node's
636
- * content.
637
- */
638
- VALUE
639
- ruby_xml_node_content_add(VALUE self, VALUE obj) {
640
-
641
- </pre>
642
- </div>
643
- </div>
644
- </div>
645
-
646
- <div id="method-M000169" class="method-detail">
647
- <a name="M000169"></a>
648
-
649
- <div class="method-heading">
650
- <span class="method-name">==</span><span class="method-args">(p1)</span>
651
- </div>
652
-
653
- <div class="method-description">
654
- <p>
655
- Alias for eql?
656
- </p>
657
- </div>
658
- </div>
659
-
660
- <div id="method-M000118" class="method-detail">
661
- <a name="M000118"></a>
662
-
663
- <div class="method-heading">
664
- <a href="#M000118" class="method-signature">
665
- <span class="method-name">node.property("name") &rarr; "string"<br />
666
- node["name"] &rarr; "string"<br />
667
- </span>
668
- </a>
669
- </div>
670
-
671
- <div class="method-description">
672
- <p>
673
- Obtain the named property.
674
- </p>
675
- <p><a class="source-toggle" href="#"
676
- onclick="toggleCode('M000118-source');return false;">[Source]</a></p>
677
- <div class="method-source-code" id="M000118-source">
678
- <pre>
679
- /*
680
- * call-seq:
681
- * node.property(&quot;name&quot;) -&gt; &quot;string&quot;
682
- * node[&quot;name&quot;] -&gt; &quot;string&quot;
683
- *
684
- * Obtain the named property.
685
- */
686
- VALUE
687
- ruby_xml_node_property_get(VALUE self, VALUE name) {
688
-
689
- </pre>
690
- </div>
691
- </div>
692
- </div>
693
-
694
- <div id="method-M000126" class="method-detail">
695
- <a name="M000126"></a>
696
-
697
- <div class="method-heading">
698
- <a href="#M000126" class="method-signature">
699
- <span class="method-name">node["name"] = "string"<br />
700
- </span>
701
- </a>
702
- </div>
703
-
704
- <div class="method-description">
705
- <p>
706
- <a href="Node/Set.html">Set</a> the named property.
707
- </p>
708
- <p><a class="source-toggle" href="#"
709
- onclick="toggleCode('M000126-source');return false;">[Source]</a></p>
710
- <div class="method-source-code" id="M000126-source">
711
- <pre>
712
- /*
713
- * call-seq:
714
- * node[&quot;name&quot;] = &quot;string&quot;
715
- *
716
- * Set the named property.
717
- */
718
- VALUE
719
- ruby_xml_node_property_set(VALUE self, VALUE name, VALUE value) {
720
-
721
- </pre>
722
- </div>
723
- </div>
724
- </div>
725
-
726
- <div id="method-M000184" class="method-detail">
727
- <a name="M000184"></a>
728
-
729
- <div class="method-heading">
730
- <a href="#M000184" class="method-signature">
731
- <span class="method-name">attribute?</span><span class="method-args">()</span>
732
- </a>
733
- </div>
734
-
735
- <div class="method-description">
736
- <p>
737
- Specifies if this is an attribute node
738
- </p>
739
- <p><a class="source-toggle" href="#"
740
- onclick="toggleCode('M000184-source');return false;">[Source]</a></p>
741
- <div class="method-source-code" id="M000184-source">
742
- <pre>
743
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 158</span>
744
- 158: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attribute?</span>
745
- 159: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ATTRIBUTE_NODE</span>
746
- 160: <span class="ruby-keyword kw">end</span>
747
- </pre>
748
- </div>
749
- </div>
750
- </div>
751
-
752
- <div id="method-M000185" class="method-detail">
753
- <a name="M000185"></a>
754
-
755
- <div class="method-heading">
756
- <a href="#M000185" class="method-signature">
757
- <span class="method-name">attribute_decl?</span><span class="method-args">()</span>
758
- </a>
759
- </div>
760
-
761
- <div class="method-description">
762
- <p>
763
- Specifies if this is an attribute declaration node
764
- </p>
765
- <p><a class="source-toggle" href="#"
766
- onclick="toggleCode('M000185-source');return false;">[Source]</a></p>
767
- <div class="method-source-code" id="M000185-source">
768
- <pre>
769
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 163</span>
770
- 163: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attribute_decl?</span>
771
- 164: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ATTRIBUTE_DECL</span>
772
- 165: <span class="ruby-keyword kw">end</span>
773
- </pre>
774
- </div>
775
- </div>
776
- </div>
777
-
778
- <div id="method-M000132" class="method-detail">
779
- <a name="M000132"></a>
780
-
781
- <div class="method-heading">
782
- <a href="#M000132" class="method-signature">
783
- <span class="method-name">node.attributes &rarr; attributes<br />
784
- </span>
785
- </a>
786
- </div>
787
-
788
- <div class="method-description">
789
- <p>
790
- Returns the <a href="Attributes.html">XML::Attributes</a> for this node.
791
- </p>
792
- <p><a class="source-toggle" href="#"
793
- onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
794
- <div class="method-source-code" id="M000132-source">
795
- <pre>
796
- /*
797
- * call-seq:
798
- * node.attributes -&gt; attributes
799
- *
800
- * Returns the XML::Attributes for this node.
801
- */
802
- VALUE
803
- ruby_xml_node_attributes_get(VALUE self) {
804
-
805
- </pre>
806
- </div>
807
- </div>
808
- </div>
809
-
810
- <div id="method-M000170" class="method-detail">
811
- <a name="M000170"></a>
812
-
813
- <div class="method-heading">
814
- <a href="#M000170" class="method-signature">
815
- <span class="method-name">attributes?</span><span class="method-args">()</span>
816
- </a>
817
- </div>
818
-
819
- <div class="method-description">
820
- <p>
821
- Determines whether this node has <a href="Node.html#M000132">attributes</a>
822
- </p>
823
- <p><a class="source-toggle" href="#"
824
- onclick="toggleCode('M000170-source');return false;">[Source]</a></p>
825
- <div class="method-source-code" id="M000170-source">
826
- <pre>
827
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 8</span>
828
- 8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attributes?</span>
829
- 9: <span class="ruby-identifier">attributes</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
830
- 10: <span class="ruby-keyword kw">end</span>
831
- </pre>
832
- </div>
833
- </div>
834
- </div>
835
-
836
- <div id="method-M000133" class="method-detail">
837
- <a name="M000133"></a>
838
-
839
- <div class="method-heading">
840
- <a href="#M000133" class="method-signature">
841
- <span class="method-name">node.base &rarr; "uri"<br />
842
- </span>
843
- </a>
844
- </div>
845
-
846
- <div class="method-description">
847
- <p>
848
- Obtain this node&#8216;s <a href="Node.html#M000133">base</a> URI.
849
- </p>
850
- <p><a class="source-toggle" href="#"
851
- onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
852
- <div class="method-source-code" id="M000133-source">
853
- <pre>
854
- /*
855
- * call-seq:
856
- * node.base -&gt; &quot;uri&quot;
857
- *
858
- * Obtain this node's base URI.
859
- */
860
- VALUE
861
- ruby_xml_node_base_get(VALUE self) {
862
-
863
- </pre>
864
- </div>
865
- </div>
866
- </div>
867
-
868
- <div id="method-M000134" class="method-detail">
869
- <a name="M000134"></a>
870
-
871
- <div class="method-heading">
872
- <a href="#M000134" class="method-signature">
873
- <span class="method-name">node.base = "uri"<br />
874
- </span>
875
- </a>
876
- </div>
877
-
878
- <div class="method-description">
879
- <p>
880
- <a href="Node/Set.html">Set</a> this node&#8216;s <a
881
- href="Node.html#M000133">base</a> URI.
882
- </p>
883
- <p><a class="source-toggle" href="#"
884
- onclick="toggleCode('M000134-source');return false;">[Source]</a></p>
885
- <div class="method-source-code" id="M000134-source">
886
- <pre>
887
- /*
888
- * call-seq:
889
- * node.base = &quot;uri&quot;
890
- *
891
- * Set this node's base URI.
892
- */
893
- VALUE
894
- ruby_xml_node_base_set(VALUE self, VALUE uri) {
895
-
896
- </pre>
897
- </div>
898
- </div>
899
- </div>
900
-
901
- <div id="method-M000135" class="method-detail">
902
- <a name="M000135"></a>
903
-
904
- <div class="method-heading">
905
- <a href="#M000135" class="method-signature">
906
- <span class="method-name">node.empty? &rarr; (true|false)<br />
907
- </span>
908
- </a>
909
- </div>
910
-
911
- <div class="method-description">
912
- <p>
913
- Determine whether this node is empty.
914
- </p>
915
- <p><a class="source-toggle" href="#"
916
- onclick="toggleCode('M000135-source');return false;">[Source]</a></p>
917
- <div class="method-source-code" id="M000135-source">
918
- <pre>
919
- /*
920
- * call-seq:
921
- * node.empty? -&gt; (true|false)
922
- *
923
- * Determine whether this node is empty.
924
- */
925
- VALUE
926
- ruby_xml_node_empty_q(VALUE self) {
927
-
928
- </pre>
929
- </div>
930
- </div>
931
- </div>
932
-
933
- <div id="method-M000186" class="method-detail">
934
- <a name="M000186"></a>
935
-
936
- <div class="method-heading">
937
- <a href="#M000186" class="method-signature">
938
- <span class="method-name">cdata?</span><span class="method-args">()</span>
939
- </a>
940
- </div>
941
-
942
- <div class="method-description">
943
- <p>
944
- Specifies if this is an CDATA node
945
- </p>
946
- <p><a class="source-toggle" href="#"
947
- onclick="toggleCode('M000186-source');return false;">[Source]</a></p>
948
- <div class="method-source-code" id="M000186-source">
949
- <pre>
950
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 168</span>
951
- 168: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cdata?</span>
952
- 169: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">CDATA_SECTION_NODE</span>
953
- 170: <span class="ruby-keyword kw">end</span>
954
- </pre>
955
- </div>
956
- </div>
957
- </div>
958
-
959
- <div id="method-M000206" class="method-detail">
960
- <a name="M000206"></a>
961
-
962
- <div class="method-heading">
963
- <span class="method-name">child</span><span class="method-args">()</span>
964
- </div>
965
-
966
- <div class="method-description">
967
- <p>
968
- Alias for <a href="Node.html#M000120">first</a>
969
- </p>
970
- </div>
971
- </div>
972
-
973
- <div id="method-M000128" class="method-detail">
974
- <a name="M000128"></a>
975
-
976
- <div class="method-heading">
977
- <a href="#M000128" class="method-signature">
978
- <span class="method-name">node.child = node<br />
979
- </span>
980
- </a>
981
- </div>
982
-
983
- <div class="method-description">
984
- <p>
985
- <a href="Node/Set.html">Set</a> a <a href="Node.html#M000206">child</a>
986
- node for this node. Also called for &lt;&lt;
987
- </p>
988
- <p><a class="source-toggle" href="#"
989
- onclick="toggleCode('M000128-source');return false;">[Source]</a></p>
990
- <div class="method-source-code" id="M000128-source">
991
- <pre>
992
- /*
993
- * call-seq:
994
- * node.child = node
995
- *
996
- * Set a child node for this node. Also called for &lt;&lt;
997
- */
998
- VALUE
999
- ruby_xml_node_child_set(VALUE self, VALUE rnode) {
1000
-
1001
- </pre>
1002
- </div>
1003
- </div>
1004
- </div>
1005
-
1006
- <div id="method-M000204" class="method-detail">
1007
- <a name="M000204"></a>
1008
-
1009
- <div class="method-heading">
1010
- <span class="method-name">child?</span><span class="method-args">()</span>
1011
- </div>
1012
-
1013
- <div class="method-description">
1014
- <p>
1015
- Alias for <a href="Node.html#M000120">first</a>?
1016
- </p>
1017
- </div>
1018
- </div>
1019
-
1020
- <div id="method-M000127" class="method-detail">
1021
- <a name="M000127"></a>
1022
-
1023
- <div class="method-heading">
1024
- <a href="#M000127" class="method-signature">
1025
- <span class="method-name">node.child_add(node)<br />
1026
- </span>
1027
- </a>
1028
- </div>
1029
-
1030
- <div class="method-description">
1031
- <p>
1032
- <a href="Node/Set.html">Set</a> a <a href="Node.html#M000206">child</a>
1033
- node for this node.
1034
- </p>
1035
- <p><a class="source-toggle" href="#"
1036
- onclick="toggleCode('M000127-source');return false;">[Source]</a></p>
1037
- <div class="method-source-code" id="M000127-source">
1038
- <pre>
1039
- /*
1040
- * call-seq:
1041
- * node.child_add(node)
1042
- *
1043
- * Set a child node for this node.
1044
- */
1045
- VALUE
1046
- ruby_xml_node_child_add(VALUE self, VALUE rnode) {
1047
-
1048
- </pre>
1049
- </div>
1050
- </div>
1051
- </div>
1052
-
1053
- <div id="method-M000179" class="method-detail">
1054
- <a name="M000179"></a>
1055
-
1056
- <div class="method-heading">
1057
- <a href="#M000179" class="method-signature">
1058
- <span class="method-name">children</span><span class="method-args">()</span>
1059
- </a>
1060
- </div>
1061
-
1062
- <div class="method-description">
1063
- <p>
1064
- Returns this node&#8216;s <a href="Node.html#M000179">children</a> as an
1065
- array.
1066
- </p>
1067
- <p><a class="source-toggle" href="#"
1068
- onclick="toggleCode('M000179-source');return false;">[Source]</a></p>
1069
- <div class="method-source-code" id="M000179-source">
1070
- <pre>
1071
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 82</span>
1072
- 82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">children</span>
1073
- 83: <span class="ruby-identifier">entries</span>
1074
- 84: <span class="ruby-keyword kw">end</span>
1075
- </pre>
1076
- </div>
1077
- </div>
1078
- </div>
1079
-
1080
- <div id="method-M000205" class="method-detail">
1081
- <a name="M000205"></a>
1082
-
1083
- <div class="method-heading">
1084
- <span class="method-name">children?</span><span class="method-args">()</span>
1085
- </div>
1086
-
1087
- <div class="method-description">
1088
- <p>
1089
- Alias for <a href="Node.html#M000120">first</a>?
1090
- </p>
1091
- </div>
1092
- </div>
1093
-
1094
- <div id="method-M000171" class="method-detail">
1095
- <a name="M000171"></a>
1096
-
1097
- <div class="method-heading">
1098
- <a href="#M000171" class="method-signature">
1099
- <span class="method-name">clone</span><span class="method-args">()</span>
1100
- </a>
1101
- </div>
1102
-
1103
- <div class="method-description">
1104
- <p>
1105
- Create a shallow <a href="Node.html#M000136">copy</a> of the node. To
1106
- create a deep <a href="Node.html#M000136">copy</a> call <a
1107
- href="Node.html#M000136">Node#copy(true)</a>
1108
- </p>
1109
- <p><a class="source-toggle" href="#"
1110
- onclick="toggleCode('M000171-source');return false;">[Source]</a></p>
1111
- <div class="method-source-code" id="M000171-source">
1112
- <pre>
1113
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 14</span>
1114
- 14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone</span>
1115
- 15: <span class="ruby-identifier">copy</span>(<span class="ruby-keyword kw">false</span>)
1116
- 16: <span class="ruby-keyword kw">end</span>
1117
- </pre>
1118
- </div>
1119
- </div>
1120
- </div>
1121
-
1122
- <div id="method-M000187" class="method-detail">
1123
- <a name="M000187"></a>
1124
-
1125
- <div class="method-heading">
1126
- <a href="#M000187" class="method-signature">
1127
- <span class="method-name">comment?</span><span class="method-args">()</span>
1128
- </a>
1129
- </div>
1130
-
1131
- <div class="method-description">
1132
- <p>
1133
- Specifies if this is an comment node
1134
- </p>
1135
- <p><a class="source-toggle" href="#"
1136
- onclick="toggleCode('M000187-source');return false;">[Source]</a></p>
1137
- <div class="method-source-code" id="M000187-source">
1138
- <pre>
1139
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 173</span>
1140
- 173: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">comment?</span>
1141
- 174: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">COMMENT_NODE</span>
1142
- 175: <span class="ruby-keyword kw">end</span>
1143
- </pre>
1144
- </div>
1145
- </div>
1146
- </div>
1147
-
1148
- <div id="method-M000137" class="method-detail">
1149
- <a name="M000137"></a>
1150
-
1151
- <div class="method-heading">
1152
- <a href="#M000137" class="method-signature">
1153
- <span class="method-name">node.content &rarr; "string"<br />
1154
- </span>
1155
- </a>
1156
- </div>
1157
-
1158
- <div class="method-description">
1159
- <p>
1160
- Obtain this node&#8216;s <a href="Node.html#M000137">content</a> as a
1161
- string.
1162
- </p>
1163
- <p><a class="source-toggle" href="#"
1164
- onclick="toggleCode('M000137-source');return false;">[Source]</a></p>
1165
- <div class="method-source-code" id="M000137-source">
1166
- <pre>
1167
- /*
1168
- * call-seq:
1169
- * node.content -&gt; &quot;string&quot;
1170
- *
1171
- * Obtain this node's content as a string.
1172
- */
1173
- VALUE
1174
- ruby_xml_node_content_get(VALUE self) {
1175
-
1176
- </pre>
1177
- </div>
1178
- </div>
1179
- </div>
1180
-
1181
- <div id="method-M000138" class="method-detail">
1182
- <a name="M000138"></a>
1183
-
1184
- <div class="method-heading">
1185
- <a href="#M000138" class="method-signature">
1186
- <span class="method-name">node.content = "string"<br />
1187
- </span>
1188
- </a>
1189
- </div>
1190
-
1191
- <div class="method-description">
1192
- <p>
1193
- <a href="Node/Set.html">Set</a> this node&#8216;s <a
1194
- href="Node.html#M000137">content</a> to the specified string.
1195
- </p>
1196
- <p><a class="source-toggle" href="#"
1197
- onclick="toggleCode('M000138-source');return false;">[Source]</a></p>
1198
- <div class="method-source-code" id="M000138-source">
1199
- <pre>
1200
- /*
1201
- * call-seq:
1202
- * node.content = &quot;string&quot;
1203
- *
1204
- * Set this node's content to the specified string.
1205
- */
1206
- VALUE
1207
- ruby_xml_node_content_set(VALUE self, VALUE content) {
1208
-
1209
- </pre>
1210
- </div>
1211
- </div>
1212
- </div>
1213
-
1214
- <div id="method-M000139" class="method-detail">
1215
- <a name="M000139"></a>
1216
-
1217
- <div class="method-heading">
1218
- <a href="#M000139" class="method-signature">
1219
- <span class="method-name">node.content_stripped &rarr; "string"<br />
1220
- </span>
1221
- </a>
1222
- </div>
1223
-
1224
- <div class="method-description">
1225
- <p>
1226
- Obtain this node&#8216;s stripped <a href="Node.html#M000137">content</a>.
1227
- </p>
1228
- <p>
1229
- <b>Deprecated</b>: Stripped <a href="Node.html#M000137">content</a> can be
1230
- obtained via the <tt><a href="Node.html#M000137">content</a></tt> method.
1231
- </p>
1232
- <p><a class="source-toggle" href="#"
1233
- onclick="toggleCode('M000139-source');return false;">[Source]</a></p>
1234
- <div class="method-source-code" id="M000139-source">
1235
- <pre>
1236
- /*
1237
- * call-seq:
1238
- * node.content_stripped -&gt; &quot;string&quot;
1239
- *
1240
- * Obtain this node's stripped content.
1241
- *
1242
- * *Deprecated*: Stripped content can be obtained via the
1243
- * +content+ method.
1244
- */
1245
- VALUE
1246
- ruby_xml_node_content_stripped_get(VALUE self) {
1247
-
1248
- </pre>
1249
- </div>
1250
- </div>
1251
- </div>
1252
-
1253
- <div id="method-M000136" class="method-detail">
1254
- <a name="M000136"></a>
1255
-
1256
- <div class="method-heading">
1257
- <a href="#M000136" class="method-signature">
1258
- <span class="method-name">node.copy &rarr; XML::Node<br />
1259
- </span>
1260
- </a>
1261
- </div>
1262
-
1263
- <div class="method-description">
1264
- <p>
1265
- Creates a <a href="Node.html#M000136">copy</a> of this node. To create a
1266
- shallow <a href="Node.html#M000136">copy</a> set the deep parameter to
1267
- false. To create a deep <a href="Node.html#M000136">copy</a> set the deep
1268
- parameter to true.
1269
- </p>
1270
- <p><a class="source-toggle" href="#"
1271
- onclick="toggleCode('M000136-source');return false;">[Source]</a></p>
1272
- <div class="method-source-code" id="M000136-source">
1273
- <pre>
1274
- /*
1275
- * call-seq:
1276
- * node.copy -&gt; XML::Node
1277
- *
1278
- * Creates a copy of this node. To create a
1279
- * shallow copy set the deep parameter to false.
1280
- * To create a deep copy set the deep parameter
1281
- * to true.
1282
- *
1283
- */
1284
- VALUE
1285
- ruby_xml_node_copy(VALUE self, VALUE deep) {
1286
-
1287
- </pre>
1288
- </div>
1289
- </div>
1290
- </div>
1291
-
1292
- <div id="method-M000142" class="method-detail">
1293
- <a name="M000142"></a>
1294
-
1295
- <div class="method-heading">
1296
- <a href="#M000142" class="method-signature">
1297
- <span class="method-name">node.debug_dump &rarr; (true|nil)<br />
1298
- </span>
1299
- </a>
1300
- </div>
1301
-
1302
- <div class="method-description">
1303
- <p>
1304
- Dump this node to stdout, including any debugging information.
1305
- </p>
1306
- <p><a class="source-toggle" href="#"
1307
- onclick="toggleCode('M000142-source');return false;">[Source]</a></p>
1308
- <div class="method-source-code" id="M000142-source">
1309
- <pre>
1310
- /*
1311
- * call-seq:
1312
- * node.debug_dump -&gt; (true|nil)
1313
- *
1314
- * Dump this node to stdout, including any debugging
1315
- * information.
1316
- */
1317
- VALUE
1318
- ruby_xml_node_debug_dump(VALUE self) {
1319
-
1320
- </pre>
1321
- </div>
1322
- </div>
1323
- </div>
1324
-
1325
- <div id="method-M000140" class="method-detail">
1326
- <a name="M000140"></a>
1327
-
1328
- <div class="method-heading">
1329
- <a href="#M000140" class="method-signature">
1330
- <span class="method-name">node.doc &rarr; document<br />
1331
- </span>
1332
- </a>
1333
- </div>
1334
-
1335
- <div class="method-description">
1336
- <p>
1337
- Obtain the <a href="Document.html">XML::Document</a> this node belongs to.
1338
- </p>
1339
- <p><a class="source-toggle" href="#"
1340
- onclick="toggleCode('M000140-source');return false;">[Source]</a></p>
1341
- <div class="method-source-code" id="M000140-source">
1342
- <pre>
1343
- /*
1344
- * call-seq:
1345
- * node.doc -&gt; document
1346
- *
1347
- * Obtain the XML::Document this node belongs to.
1348
- */
1349
- VALUE
1350
- ruby_xml_node_doc(VALUE self) {
1351
-
1352
- </pre>
1353
- </div>
1354
- </div>
1355
- </div>
1356
-
1357
- <div id="method-M000188" class="method-detail">
1358
- <a name="M000188"></a>
1359
-
1360
- <div class="method-heading">
1361
- <a href="#M000188" class="method-signature">
1362
- <span class="method-name">docbook_doc?</span><span class="method-args">()</span>
1363
- </a>
1364
- </div>
1365
-
1366
- <div class="method-description">
1367
- <p>
1368
- Specifies if this is an docbook node
1369
- </p>
1370
- <p><a class="source-toggle" href="#"
1371
- onclick="toggleCode('M000188-source');return false;">[Source]</a></p>
1372
- <div class="method-source-code" id="M000188-source">
1373
- <pre>
1374
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 178</span>
1375
- 178: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">docbook_doc?</span>
1376
- 179: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DOCB_DOCUMENT_NODE</span>
1377
- 180: <span class="ruby-keyword kw">end</span>
1378
- </pre>
1379
- </div>
1380
- </div>
1381
- </div>
1382
-
1383
- <div id="method-M000189" class="method-detail">
1384
- <a name="M000189"></a>
1385
-
1386
- <div class="method-heading">
1387
- <a href="#M000189" class="method-signature">
1388
- <span class="method-name">doctype?</span><span class="method-args">()</span>
1389
- </a>
1390
- </div>
1391
-
1392
- <div class="method-description">
1393
- <p>
1394
- Specifies if this is an docbook node
1395
- </p>
1396
- <p><a class="source-toggle" href="#"
1397
- onclick="toggleCode('M000189-source');return false;">[Source]</a></p>
1398
- <div class="method-source-code" id="M000189-source">
1399
- <pre>
1400
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 183</span>
1401
- 183: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">doctype?</span>
1402
- 184: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DOCUMENT_TYPE_NODE</span>
1403
- 185: <span class="ruby-keyword kw">end</span>
1404
- </pre>
1405
- </div>
1406
- </div>
1407
- </div>
1408
-
1409
- <div id="method-M000190" class="method-detail">
1410
- <a name="M000190"></a>
1411
-
1412
- <div class="method-heading">
1413
- <a href="#M000190" class="method-signature">
1414
- <span class="method-name">document?</span><span class="method-args">()</span>
1415
- </a>
1416
- </div>
1417
-
1418
- <div class="method-description">
1419
- <p>
1420
- Specifies if this is an DOCTYPE node
1421
- </p>
1422
- <p><a class="source-toggle" href="#"
1423
- onclick="toggleCode('M000190-source');return false;">[Source]</a></p>
1424
- <div class="method-source-code" id="M000190-source">
1425
- <pre>
1426
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 188</span>
1427
- 188: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">document?</span>
1428
- 189: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DOCUMENT_NODE</span>
1429
- 190: <span class="ruby-keyword kw">end</span>
1430
- </pre>
1431
- </div>
1432
- </div>
1433
- </div>
1434
-
1435
- <div id="method-M000191" class="method-detail">
1436
- <a name="M000191"></a>
1437
-
1438
- <div class="method-heading">
1439
- <a href="#M000191" class="method-signature">
1440
- <span class="method-name">dtd?</span><span class="method-args">()</span>
1441
- </a>
1442
- </div>
1443
-
1444
- <div class="method-description">
1445
- <p>
1446
- Specifies if this is an DTD node
1447
- </p>
1448
- <p><a class="source-toggle" href="#"
1449
- onclick="toggleCode('M000191-source');return false;">[Source]</a></p>
1450
- <div class="method-source-code" id="M000191-source">
1451
- <pre>
1452
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 193</span>
1453
- 193: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dtd?</span>
1454
- 194: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DTD_NODE</span>
1455
- 195: <span class="ruby-keyword kw">end</span>
1456
- </pre>
1457
- </div>
1458
- </div>
1459
- </div>
1460
-
1461
- <div id="method-M000141" class="method-detail">
1462
- <a name="M000141"></a>
1463
-
1464
- <div class="method-heading">
1465
- <a href="#M000141" class="method-signature">
1466
- <span class="method-name">node.dump &rarr; (true|nil)<br />
1467
- </span>
1468
- </a>
1469
- </div>
1470
-
1471
- <div class="method-description">
1472
- <p>
1473
- Dump this node to stdout.
1474
- </p>
1475
- <p><a class="source-toggle" href="#"
1476
- onclick="toggleCode('M000141-source');return false;">[Source]</a></p>
1477
- <div class="method-source-code" id="M000141-source">
1478
- <pre>
1479
- /*
1480
- * call-seq:
1481
- * node.dump -&gt; (true|nil)
1482
- *
1483
- * Dump this node to stdout.
1484
- */
1485
- VALUE
1486
- ruby_xml_node_dump(VALUE self) {
1487
-
1488
- </pre>
1489
- </div>
1490
- </div>
1491
- </div>
1492
-
1493
- <div id="method-M000172" class="method-detail">
1494
- <a name="M000172"></a>
1495
-
1496
- <div class="method-heading">
1497
- <a href="#M000172" class="method-signature">
1498
- <span class="method-name">dup</span><span class="method-args">()</span>
1499
- </a>
1500
- </div>
1501
-
1502
- <div class="method-description">
1503
- <p>
1504
- Create a shallow <a href="Node.html#M000136">copy</a> of the node. To
1505
- create a deep <a href="Node.html#M000136">copy</a> call <a
1506
- href="Node.html#M000136">Node#copy(true)</a>
1507
- </p>
1508
- <p><a class="source-toggle" href="#"
1509
- onclick="toggleCode('M000172-source');return false;">[Source]</a></p>
1510
- <div class="method-source-code" id="M000172-source">
1511
- <pre>
1512
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 20</span>
1513
- 20: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dup</span>
1514
- 21: <span class="ruby-identifier">copy</span>(<span class="ruby-keyword kw">false</span>)
1515
- 22: <span class="ruby-keyword kw">end</span>
1516
- </pre>
1517
- </div>
1518
- </div>
1519
- </div>
1520
-
1521
- <div id="method-M000119" class="method-detail">
1522
- <a name="M000119"></a>
1523
-
1524
- <div class="method-heading">
1525
- <a href="#M000119" class="method-signature">
1526
- <span class="method-name">node.each &rarr; XML::Node<br />
1527
- </span>
1528
- </a>
1529
- </div>
1530
-
1531
- <div class="method-description">
1532
- <p>
1533
- Iterates over this node&#8216;s <a href="Node.html#M000179">children</a>,
1534
- including text nodes, element nodes, etc. If you wish to iterate only over
1535
- <a href="Node.html#M000206">child</a> elements, use <a
1536
- href="Node.html#M000176">XML::Node#each_element</a>.
1537
- </p>
1538
- <pre>
1539
- doc = XML::Document.new('model/books.xml')
1540
- doc.root.each {|node| puts node}
1541
- </pre>
1542
- <p><a class="source-toggle" href="#"
1543
- onclick="toggleCode('M000119-source');return false;">[Source]</a></p>
1544
- <div class="method-source-code" id="M000119-source">
1545
- <pre>
1546
- /*
1547
- * call-seq:
1548
- * node.each -&gt; XML::Node
1549
- *
1550
- * Iterates over this node's children, including text
1551
- * nodes, element nodes, etc. If you wish to iterate
1552
- * only over child elements, use XML::Node#each_element.
1553
- *
1554
- * doc = XML::Document.new('model/books.xml')
1555
- * doc.root.each {|node| puts node}
1556
- */
1557
- VALUE
1558
- ruby_xml_node_each(VALUE self) {
1559
-
1560
- </pre>
1561
- </div>
1562
- </div>
1563
- </div>
1564
-
1565
- <div id="method-M000175" class="method-detail">
1566
- <a name="M000175"></a>
1567
-
1568
- <div class="method-heading">
1569
- <a href="#M000175" class="method-signature">
1570
- <span class="method-name">each_attr</span><span class="method-args">() {|attr| ...}</span>
1571
- </a>
1572
- </div>
1573
-
1574
- <div class="method-description">
1575
- <p>
1576
- &#8212;&#8212;- Traversal &#8212;&#8212;&#8212;&#8212;&#8212;- Iterates
1577
- over this node&#8216;s <a href="Node.html#M000132">attributes</a>.
1578
- </p>
1579
- <pre>
1580
- doc = XML::Document.new('model/books.xml')
1581
- doc.root.each_attr {|attr| puts attr}
1582
- </pre>
1583
- <p><a class="source-toggle" href="#"
1584
- onclick="toggleCode('M000175-source');return false;">[Source]</a></p>
1585
- <div class="method-source-code" id="M000175-source">
1586
- <pre>
1587
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 54</span>
1588
- 54: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_attr</span>
1589
- 55: <span class="ruby-identifier">attributes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">attr</span><span class="ruby-operator">|</span>
1590
- 56: <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">attr</span>)
1591
- 57: <span class="ruby-keyword kw">end</span>
1592
- 58: <span class="ruby-keyword kw">end</span>
1593
- </pre>
1594
- </div>
1595
- </div>
1596
- </div>
1597
-
1598
- <div id="method-M000207" class="method-detail">
1599
- <a name="M000207"></a>
1600
-
1601
- <div class="method-heading">
1602
- <span class="method-name">each_child</span><span class="method-args">()</span>
1603
- </div>
1604
-
1605
- <div class="method-description">
1606
- <p>
1607
- Alias for <a href="Node.html#M000119">each</a>
1608
- </p>
1609
- </div>
1610
- </div>
1611
-
1612
- <div id="method-M000176" class="method-detail">
1613
- <a name="M000176"></a>
1614
-
1615
- <div class="method-heading">
1616
- <a href="#M000176" class="method-signature">
1617
- <span class="method-name">each_element</span><span class="method-args">() {|node| ...}</span>
1618
- </a>
1619
- </div>
1620
-
1621
- <div class="method-description">
1622
- <p>
1623
- Iterates over this node&#8216;s <a href="Node.html#M000206">child</a>
1624
- elements (nodes that have a <a href="Node.html#M000153">node_type</a> ==
1625
- ELEMENT_NODE).
1626
- </p>
1627
- <pre>
1628
- doc = XML::Document.new('model/books.xml')
1629
- doc.root.each_element {|element| puts element}
1630
- </pre>
1631
- <p><a class="source-toggle" href="#"
1632
- onclick="toggleCode('M000176-source');return false;">[Source]</a></p>
1633
- <div class="method-source-code" id="M000176-source">
1634
- <pre>
1635
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 65</span>
1636
- 65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_element</span>
1637
- 66: <span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">node</span><span class="ruby-operator">|</span>
1638
- 67: <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">node</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ELEMENT_NODE</span>
1639
- 68: <span class="ruby-keyword kw">end</span>
1640
- 69: <span class="ruby-keyword kw">end</span>
1641
- </pre>
1642
- </div>
1643
- </div>
1644
- </div>
1645
-
1646
- <div id="method-M000192" class="method-detail">
1647
- <a name="M000192"></a>
1648
-
1649
- <div class="method-heading">
1650
- <a href="#M000192" class="method-signature">
1651
- <span class="method-name">element?</span><span class="method-args">()</span>
1652
- </a>
1653
- </div>
1654
-
1655
- <div class="method-description">
1656
- <p>
1657
- Specifies if this is an element node
1658
- </p>
1659
- <p><a class="source-toggle" href="#"
1660
- onclick="toggleCode('M000192-source');return false;">[Source]</a></p>
1661
- <div class="method-source-code" id="M000192-source">
1662
- <pre>
1663
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 198</span>
1664
- 198: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">element?</span>
1665
- 199: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ELEMENT_NODE</span>
1666
- 200: <span class="ruby-keyword kw">end</span>
1667
- </pre>
1668
- </div>
1669
- </div>
1670
- </div>
1671
-
1672
- <div id="method-M000194" class="method-detail">
1673
- <a name="M000194"></a>
1674
-
1675
- <div class="method-heading">
1676
- <a href="#M000194" class="method-signature">
1677
- <span class="method-name">element_decl?</span><span class="method-args">()</span>
1678
- </a>
1679
- </div>
1680
-
1681
- <div class="method-description">
1682
- <p>
1683
- Specifies if this is an element declaration node
1684
- </p>
1685
- <p><a class="source-toggle" href="#"
1686
- onclick="toggleCode('M000194-source');return false;">[Source]</a></p>
1687
- <div class="method-source-code" id="M000194-source">
1688
- <pre>
1689
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 208</span>
1690
- 208: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">element_decl?</span>
1691
- 209: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ELEMENT_DECL</span>
1692
- 210: <span class="ruby-keyword kw">end</span>
1693
- </pre>
1694
- </div>
1695
- </div>
1696
- </div>
1697
-
1698
- <div id="method-M000143" class="method-detail">
1699
- <a name="M000143"></a>
1700
-
1701
- <div class="method-heading">
1702
- <a href="#M000143" class="method-signature">
1703
- <span class="method-name">node.empty? &rarr; (true|false)<br />
1704
- </span>
1705
- </a>
1706
- </div>
1707
-
1708
- <div class="method-description">
1709
- <p>
1710
- Determine whether this node is empty.
1711
- </p>
1712
- <p><a class="source-toggle" href="#"
1713
- onclick="toggleCode('M000143-source');return false;">[Source]</a></p>
1714
- <div class="method-source-code" id="M000143-source">
1715
- <pre>
1716
- /*
1717
- * call-seq:
1718
- * node.empty? -&gt; (true|false)
1719
- *
1720
- * Determine whether this node is empty.
1721
- */
1722
- VALUE
1723
- ruby_xml_node_empty_q(VALUE self) {
1724
-
1725
- </pre>
1726
- </div>
1727
- </div>
1728
- </div>
1729
-
1730
- <div id="method-M000193" class="method-detail">
1731
- <a name="M000193"></a>
1732
-
1733
- <div class="method-heading">
1734
- <a href="#M000193" class="method-signature">
1735
- <span class="method-name">entity?</span><span class="method-args">()</span>
1736
- </a>
1737
- </div>
1738
-
1739
- <div class="method-description">
1740
- <p>
1741
- Specifies if this is an entity node
1742
- </p>
1743
- <p><a class="source-toggle" href="#"
1744
- onclick="toggleCode('M000193-source');return false;">[Source]</a></p>
1745
- <div class="method-source-code" id="M000193-source">
1746
- <pre>
1747
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 203</span>
1748
- 203: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entity?</span>
1749
- 204: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ENTITY_NODE</span>
1750
- 205: <span class="ruby-keyword kw">end</span>
1751
- </pre>
1752
- </div>
1753
- </div>
1754
- </div>
1755
-
1756
- <div id="method-M000195" class="method-detail">
1757
- <a name="M000195"></a>
1758
-
1759
- <div class="method-heading">
1760
- <a href="#M000195" class="method-signature">
1761
- <span class="method-name">entity_ref?</span><span class="method-args">()</span>
1762
- </a>
1763
- </div>
1764
-
1765
- <div class="method-description">
1766
- <p>
1767
- Specifies if this is an entity reference node
1768
- </p>
1769
- <p><a class="source-toggle" href="#"
1770
- onclick="toggleCode('M000195-source');return false;">[Source]</a></p>
1771
- <div class="method-source-code" id="M000195-source">
1772
- <pre>
1773
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 213</span>
1774
- 213: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entity_ref?</span>
1775
- 214: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ENTITY_REF_NODE</span>
1776
- 215: <span class="ruby-keyword kw">end</span>
1777
- </pre>
1778
- </div>
1779
- </div>
1780
- </div>
1781
-
1782
- <div id="method-M000144" class="method-detail">
1783
- <a name="M000144"></a>
1784
-
1785
- <div class="method-heading">
1786
- <a href="#M000144" class="method-signature">
1787
- <span class="method-name">node.eql?(other_node) => (true|false)<br />
1788
- </span>
1789
- </a>
1790
- </div>
1791
-
1792
- <div class="method-description">
1793
- <p>
1794
- Test equality between the two nodes. Two nodes are equal if they are the
1795
- same node or have the same <a href="../XML.html">XML</a> representation.
1796
- </p>
1797
- <p><a class="source-toggle" href="#"
1798
- onclick="toggleCode('M000144-source');return false;">[Source]</a></p>
1799
- <div class="method-source-code" id="M000144-source">
1800
- <pre>
1801
- /*
1802
- * call-seq:
1803
- * node.eql?(other_node) =&gt; (true|false)
1804
- *
1805
- * Test equality between the two nodes. Two nodes are equal
1806
- * if they are the same node or have the same XML representation.*/
1807
- VALUE
1808
- ruby_xml_node_eql_q(VALUE self, VALUE other) {
1809
-
1810
- </pre>
1811
- </div>
1812
- </div>
1813
- </div>
1814
-
1815
- <div id="method-M000173" class="method-detail">
1816
- <a name="M000173"></a>
1817
-
1818
- <div class="method-heading">
1819
- <a href="#M000173" class="method-signature">
1820
- <span class="method-name">find</span><span class="method-args">(xpath, nslist = nil)</span>
1821
- </a>
1822
- </div>
1823
-
1824
- <div class="method-description">
1825
- <p>
1826
- Return nodes matching the specified xpath expression. For more information,
1827
- please refer to the documentation for <a
1828
- href="Document.html#M000359">XML::Document#find</a>.
1829
- </p>
1830
- <p><a class="source-toggle" href="#"
1831
- onclick="toggleCode('M000173-source');return false;">[Source]</a></p>
1832
- <div class="method-source-code" id="M000173-source">
1833
- <pre>
1834
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 27</span>
1835
- 27: <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>)
1836
- 28: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">doc</span>
1837
- 29: <span class="ruby-identifier">raise</span>(<span class="ruby-constant">TypeError</span>, <span class="ruby-value str">&quot;A node must belong to a document before &quot;</span> <span class="ruby-operator">+</span>
1838
- 30: <span class="ruby-value str">&quot;it can be searched with XPath.&quot;</span>)
1839
- 31: <span class="ruby-keyword kw">end</span>
1840
- 32:
1841
- 33: <span class="ruby-identifier">context</span> = <span class="ruby-constant">XPath</span><span class="ruby-operator">::</span><span class="ruby-constant">Context</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
1842
- 34: <span class="ruby-identifier">context</span>.<span class="ruby-identifier">node</span> = <span class="ruby-keyword kw">self</span>
1843
- 35: <span class="ruby-identifier">context</span>.<span class="ruby-identifier">register_namespaces_from_node</span>(<span class="ruby-keyword kw">self</span>)
1844
- 36: <span class="ruby-identifier">context</span>.<span class="ruby-identifier">register_namespaces_from_node</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">root</span>)
1845
- 37: <span class="ruby-identifier">context</span>.<span class="ruby-identifier">register_namespaces</span>(<span class="ruby-identifier">nslist</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nslist</span>
1846
- 38:
1847
- 39: <span class="ruby-identifier">context</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">xpath</span>)
1848
- 40: <span class="ruby-keyword kw">end</span>
1849
- </pre>
1850
- </div>
1851
- </div>
1852
- </div>
1853
-
1854
- <div id="method-M000174" class="method-detail">
1855
- <a name="M000174"></a>
1856
-
1857
- <div class="method-heading">
1858
- <a href="#M000174" class="method-signature">
1859
- <span class="method-name">find_first</span><span class="method-args">(xpath, nslist = nil)</span>
1860
- </a>
1861
- </div>
1862
-
1863
- <div class="method-description">
1864
- <p>
1865
- Return the <a href="Node.html#M000120">first</a> node matching the
1866
- specified xpath expression. For more information, please refer to the
1867
- documentation for <a href="Node.html#M000173">XML::Node#find</a>.
1868
- </p>
1869
- <p><a class="source-toggle" href="#"
1870
- onclick="toggleCode('M000174-source');return false;">[Source]</a></p>
1871
- <div class="method-source-code" id="M000174-source">
1872
- <pre>
1873
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 45</span>
1874
- 45: <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>)
1875
- 46: <span class="ruby-identifier">find</span>(<span class="ruby-identifier">xpath</span>, <span class="ruby-identifier">nslist</span>).<span class="ruby-identifier">first</span>
1876
- 47: <span class="ruby-keyword kw">end</span>
1877
- </pre>
1878
- </div>
1879
- </div>
1880
- </div>
1881
-
1882
- <div id="method-M000120" class="method-detail">
1883
- <a name="M000120"></a>
1884
-
1885
- <div class="method-heading">
1886
- <a href="#M000120" class="method-signature">
1887
- <span class="method-name">node.first &rarr; XML::Node<br />
1888
- </span>
1889
- </a>
1890
- </div>
1891
-
1892
- <div class="method-description">
1893
- <p>
1894
- Returns this node&#8216;s <a href="Node.html#M000120">first</a> <a
1895
- href="Node.html#M000206">child</a> node if any.
1896
- </p>
1897
- <p><a class="source-toggle" href="#"
1898
- onclick="toggleCode('M000120-source');return false;">[Source]</a></p>
1899
- <div class="method-source-code" id="M000120-source">
1900
- <pre>
1901
- /*
1902
- * call-seq:
1903
- * node.first -&gt; XML::Node
1904
- *
1905
- * Returns this node's first child node if any.
1906
- */
1907
- VALUE
1908
- ruby_xml_node_first_get(VALUE self) {
1909
-
1910
- </pre>
1911
- </div>
1912
- </div>
1913
- </div>
1914
-
1915
- <div id="method-M000178" class="method-detail">
1916
- <a name="M000178"></a>
1917
-
1918
- <div class="method-heading">
1919
- <a href="#M000178" class="method-signature">
1920
- <span class="method-name">first?</span><span class="method-args">()</span>
1921
- </a>
1922
- </div>
1923
-
1924
- <div class="method-description">
1925
- <p>
1926
- Determines whether this node has a <a href="Node.html#M000120">first</a>
1927
- node
1928
- </p>
1929
- <p><a class="source-toggle" href="#"
1930
- onclick="toggleCode('M000178-source');return false;">[Source]</a></p>
1931
- <div class="method-source-code" id="M000178-source">
1932
- <pre>
1933
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 77</span>
1934
- 77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">first?</span>
1935
- 78: <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">first</span>.<span class="ruby-identifier">nil?</span>
1936
- 79: <span class="ruby-keyword kw">end</span>
1937
- </pre>
1938
- </div>
1939
- </div>
1940
- </div>
1941
-
1942
- <div id="method-M000196" class="method-detail">
1943
- <a name="M000196"></a>
1944
-
1945
- <div class="method-heading">
1946
- <a href="#M000196" class="method-signature">
1947
- <span class="method-name">fragment?</span><span class="method-args">()</span>
1948
- </a>
1949
- </div>
1950
-
1951
- <div class="method-description">
1952
- <p>
1953
- Specifies if this is a fragment node
1954
- </p>
1955
- <p><a class="source-toggle" href="#"
1956
- onclick="toggleCode('M000196-source');return false;">[Source]</a></p>
1957
- <div class="method-source-code" id="M000196-source">
1958
- <pre>
1959
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 218</span>
1960
- 218: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fragment?</span>
1961
- 219: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DOCUMENT_FRAG_NODE</span>
1962
- 220: <span class="ruby-keyword kw">end</span>
1963
- </pre>
1964
- </div>
1965
- </div>
1966
- </div>
1967
-
1968
- <div id="method-M000197" class="method-detail">
1969
- <a name="M000197"></a>
1970
-
1971
- <div class="method-heading">
1972
- <a href="#M000197" class="method-signature">
1973
- <span class="method-name">html_doc?</span><span class="method-args">()</span>
1974
- </a>
1975
- </div>
1976
-
1977
- <div class="method-description">
1978
- <p>
1979
- Specifies if this is a html document node
1980
- </p>
1981
- <p><a class="source-toggle" href="#"
1982
- onclick="toggleCode('M000197-source');return false;">[Source]</a></p>
1983
- <div class="method-source-code" id="M000197-source">
1984
- <pre>
1985
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 223</span>
1986
- 223: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">html_doc?</span>
1987
- 224: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">HTML_DOCUMENT_NODE</span>
1988
- 225: <span class="ruby-keyword kw">end</span>
1989
- </pre>
1990
- </div>
1991
- </div>
1992
- </div>
1993
-
1994
- <div id="method-M000145" class="method-detail">
1995
- <a name="M000145"></a>
1996
-
1997
- <div class="method-heading">
1998
- <a href="#M000145" class="method-signature">
1999
- <span class="method-name">node.lang &rarr; "string"<br />
2000
- </span>
2001
- </a>
2002
- </div>
2003
-
2004
- <div class="method-description">
2005
- <p>
2006
- Obtain the language set for this node, if any. This is set in <a
2007
- href="../XML.html">XML</a> via the xml:<a href="Node.html#M000145">lang</a>
2008
- attribute.
2009
- </p>
2010
- <p><a class="source-toggle" href="#"
2011
- onclick="toggleCode('M000145-source');return false;">[Source]</a></p>
2012
- <div class="method-source-code" id="M000145-source">
2013
- <pre>
2014
- /*
2015
- * call-seq:
2016
- * node.lang -&gt; &quot;string&quot;
2017
- *
2018
- * Obtain the language set for this node, if any.
2019
- * This is set in XML via the xml:lang attribute.
2020
- */
2021
- VALUE
2022
- ruby_xml_node_lang_get(VALUE self) {
2023
-
2024
- </pre>
2025
- </div>
2026
- </div>
2027
- </div>
2028
-
2029
- <div id="method-M000146" class="method-detail">
2030
- <a name="M000146"></a>
2031
-
2032
- <div class="method-heading">
2033
- <a href="#M000146" class="method-signature">
2034
- <span class="method-name">node.lang = "string"<br />
2035
- </span>
2036
- </a>
2037
- </div>
2038
-
2039
- <div class="method-description">
2040
- <p>
2041
- <a href="Node/Set.html">Set</a> the language for this node. This affects
2042
- the value of the xml:<a href="Node.html#M000145">lang</a> attribute.
2043
- </p>
2044
- <p><a class="source-toggle" href="#"
2045
- onclick="toggleCode('M000146-source');return false;">[Source]</a></p>
2046
- <div class="method-source-code" id="M000146-source">
2047
- <pre>
2048
- /*
2049
- * call-seq:
2050
- * node.lang = &quot;string&quot;
2051
- *
2052
- * Set the language for this node. This affects the value
2053
- * of the xml:lang attribute.
2054
- */
2055
- VALUE
2056
- ruby_xml_node_lang_set(VALUE self, VALUE lang) {
2057
-
2058
- </pre>
2059
- </div>
2060
- </div>
2061
- </div>
2062
-
2063
- <div id="method-M000121" class="method-detail">
2064
- <a name="M000121"></a>
2065
-
2066
- <div class="method-heading">
2067
- <a href="#M000121" class="method-signature">
2068
- <span class="method-name">node.last &rarr; XML::Node<br />
2069
- </span>
2070
- </a>
2071
- </div>
2072
-
2073
- <div class="method-description">
2074
- <p>
2075
- Obtain the <a href="Node.html#M000121">last</a> <a
2076
- href="Node.html#M000206">child</a> node of this node, if any.
2077
- </p>
2078
- <p><a class="source-toggle" href="#"
2079
- onclick="toggleCode('M000121-source');return false;">[Source]</a></p>
2080
- <div class="method-source-code" id="M000121-source">
2081
- <pre>
2082
- /*
2083
- * call-seq:
2084
- * node.last -&gt; XML::Node
2085
- *
2086
- * Obtain the last child node of this node, if any.
2087
- */
2088
- VALUE
2089
- ruby_xml_node_last_get(VALUE self) {
2090
-
2091
- </pre>
2092
- </div>
2093
- </div>
2094
- </div>
2095
-
2096
- <div id="method-M000182" class="method-detail">
2097
- <a name="M000182"></a>
2098
-
2099
- <div class="method-heading">
2100
- <a href="#M000182" class="method-signature">
2101
- <span class="method-name">last?</span><span class="method-args">()</span>
2102
- </a>
2103
- </div>
2104
-
2105
- <div class="method-description">
2106
- <p>
2107
- Determines whether this node has a <a href="Node.html#M000121">last</a>
2108
- node
2109
- </p>
2110
- <p><a class="source-toggle" href="#"
2111
- onclick="toggleCode('M000182-source');return false;">[Source]</a></p>
2112
- <div class="method-source-code" id="M000182-source">
2113
- <pre>
2114
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 97</span>
2115
- 97: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">last?</span>
2116
- 98: <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">last</span>.<span class="ruby-identifier">nil?</span>
2117
- 99: <span class="ruby-keyword kw">end</span>
2118
- </pre>
2119
- </div>
2120
- </div>
2121
- </div>
2122
-
2123
- <div id="method-M000147" class="method-detail">
2124
- <a name="M000147"></a>
2125
-
2126
- <div class="method-heading">
2127
- <a href="#M000147" class="method-signature">
2128
- <span class="method-name">node.line_num &rarr; num<br />
2129
- </span>
2130
- </a>
2131
- </div>
2132
-
2133
- <div class="method-description">
2134
- <p>
2135
- Obtain the line number (in the <a href="../XML.html">XML</a> document) that
2136
- this node was read from. If <tt>default_line_numbers</tt> is set false (the
2137
- default), this method returns zero.
2138
- </p>
2139
- <p><a class="source-toggle" href="#"
2140
- onclick="toggleCode('M000147-source');return false;">[Source]</a></p>
2141
- <div class="method-source-code" id="M000147-source">
2142
- <pre>
2143
- /*
2144
- * call-seq:
2145
- * node.line_num -&gt; num
2146
- *
2147
- * Obtain the line number (in the XML document) that this
2148
- * node was read from. If +default_line_numbers+ is set
2149
- * false (the default), this method returns zero.
2150
- */
2151
- VALUE
2152
- ruby_xml_node_line_num(VALUE self) {
2153
-
2154
- </pre>
2155
- </div>
2156
- </div>
2157
- </div>
2158
-
2159
- <div id="method-M000148" class="method-detail">
2160
- <a name="M000148"></a>
2161
-
2162
- <div class="method-heading">
2163
- <a href="#M000148" class="method-signature">
2164
- <span class="method-name">node.name &rarr; "string"<br />
2165
- </span>
2166
- </a>
2167
- </div>
2168
-
2169
- <div class="method-description">
2170
- <p>
2171
- Obtain this node&#8216;s <a href="Node.html#M000148">name</a>.
2172
- </p>
2173
- <p><a class="source-toggle" href="#"
2174
- onclick="toggleCode('M000148-source');return false;">[Source]</a></p>
2175
- <div class="method-source-code" id="M000148-source">
2176
- <pre>
2177
- /*
2178
- * call-seq:
2179
- * node.name -&gt; &quot;string&quot;
2180
- *
2181
- * Obtain this node's name.
2182
- */
2183
- VALUE
2184
- ruby_xml_node_name_get(VALUE self) {
2185
-
2186
- </pre>
2187
- </div>
2188
- </div>
2189
- </div>
2190
-
2191
- <div id="method-M000149" class="method-detail">
2192
- <a name="M000149"></a>
2193
-
2194
- <div class="method-heading">
2195
- <a href="#M000149" class="method-signature">
2196
- <span class="method-name">node.name = "string"<br />
2197
- </span>
2198
- </a>
2199
- </div>
2200
-
2201
- <div class="method-description">
2202
- <p>
2203
- <a href="Node/Set.html">Set</a> this node&#8216;s <a
2204
- href="Node.html#M000148">name</a>.
2205
- </p>
2206
- <p><a class="source-toggle" href="#"
2207
- onclick="toggleCode('M000149-source');return false;">[Source]</a></p>
2208
- <div class="method-source-code" id="M000149-source">
2209
- <pre>
2210
- /*
2211
- * call-seq:
2212
- * node.name = &quot;string&quot;
2213
- *
2214
- * Set this node's name.
2215
- */
2216
- VALUE
2217
- ruby_xml_node_name_set(VALUE self, VALUE name) {
2218
-
2219
- </pre>
2220
- </div>
2221
- </div>
2222
- </div>
2223
-
2224
- <div id="method-M000150" class="method-detail">
2225
- <a name="M000150"></a>
2226
-
2227
- <div class="method-heading">
2228
- <a href="#M000150" class="method-signature">
2229
- <span class="method-name">node.namespace &rarr; [namespace, ..., namespace]<br />
2230
- </span>
2231
- </a>
2232
- </div>
2233
-
2234
- <div class="method-description">
2235
- <p>
2236
- Obtain an array of +<a href="NS.html">XML::NS</a>+ objects representing
2237
- this node&#8216;s xmlns <a href="Node.html#M000132">attributes</a>
2238
- </p>
2239
- <p><a class="source-toggle" href="#"
2240
- onclick="toggleCode('M000150-source');return false;">[Source]</a></p>
2241
- <div class="method-source-code" id="M000150-source">
2242
- <pre>
2243
- /*
2244
- * call-seq:
2245
- * node.namespace -&gt; [namespace, ..., namespace]
2246
- *
2247
- * Obtain an array of +XML::NS+ objects representing
2248
- * this node's xmlns attributes
2249
- */
2250
- VALUE
2251
- ruby_xml_node_namespace_get(VALUE self) {
2252
-
2253
- </pre>
2254
- </div>
2255
- </div>
2256
- </div>
2257
-
2258
- <div id="method-M000152" class="method-detail">
2259
- <a name="M000152"></a>
2260
-
2261
- <div class="method-heading">
2262
- <a href="#M000152" class="method-signature">
2263
- <span class="method-name">node.namespace = namespace<br />
2264
- </span>
2265
- </a>
2266
- </div>
2267
-
2268
- <div class="method-description">
2269
- <p>
2270
- Add the specified <a href="NS.html">XML::NS</a> object to this node&#8216;s
2271
- xmlns <a href="Node.html#M000132">attributes</a>.
2272
- </p>
2273
- <p><a class="source-toggle" href="#"
2274
- onclick="toggleCode('M000152-source');return false;">[Source]</a></p>
2275
- <div class="method-source-code" id="M000152-source">
2276
- <pre>
2277
- /*
2278
- * call-seq:
2279
- * node.namespace = namespace
2280
- *
2281
- * Add the specified XML::NS object to this node's xmlns attributes.
2282
- */
2283
- VALUE
2284
- ruby_xml_node_namespace_set(int argc, VALUE *argv, VALUE self) {
2285
-
2286
- </pre>
2287
- </div>
2288
- </div>
2289
- </div>
2290
-
2291
- <div id="method-M000198" class="method-detail">
2292
- <a name="M000198"></a>
2293
-
2294
- <div class="method-heading">
2295
- <a href="#M000198" class="method-signature">
2296
- <span class="method-name">namespace?</span><span class="method-args">()</span>
2297
- </a>
2298
- </div>
2299
-
2300
- <div class="method-description">
2301
- <p>
2302
- Specifies if this is a <a href="Node.html#M000150">namespace</a> node (not
2303
- if it has a namepsace)
2304
- </p>
2305
- <p><a class="source-toggle" href="#"
2306
- onclick="toggleCode('M000198-source');return false;">[Source]</a></p>
2307
- <div class="method-source-code" id="M000198-source">
2308
- <pre>
2309
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 229</span>
2310
- 229: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">namespace?</span>
2311
- 230: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">NAMESPACE_DECL</span>
2312
- 231: <span class="ruby-keyword kw">end</span>
2313
- </pre>
2314
- </div>
2315
- </div>
2316
- </div>
2317
-
2318
- <div id="method-M000151" class="method-detail">
2319
- <a name="M000151"></a>
2320
-
2321
- <div class="method-heading">
2322
- <a href="#M000151" class="method-signature">
2323
- <span class="method-name">node.namespace_node &rarr; namespace.<br />
2324
- </span>
2325
- </a>
2326
- </div>
2327
-
2328
- <div class="method-description">
2329
- <p>
2330
- Obtain this node&#8216;s <a href="Node.html#M000150">namespace</a> node.
2331
- </p>
2332
- <p><a class="source-toggle" href="#"
2333
- onclick="toggleCode('M000151-source');return false;">[Source]</a></p>
2334
- <div class="method-source-code" id="M000151-source">
2335
- <pre>
2336
- /*
2337
- * call-seq:
2338
- * node.namespace_node -&gt; namespace.
2339
- *
2340
- * Obtain this node's namespace node.
2341
- */
2342
- VALUE
2343
- ruby_xml_node_namespace_get_node(VALUE self) {
2344
-
2345
- </pre>
2346
- </div>
2347
- </div>
2348
- </div>
2349
-
2350
- <div id="method-M000122" class="method-detail">
2351
- <a name="M000122"></a>
2352
-
2353
- <div class="method-heading">
2354
- <a href="#M000122" class="method-signature">
2355
- <span class="method-name">node.next &rarr; XML::Node<br />
2356
- </span>
2357
- </a>
2358
- </div>
2359
-
2360
- <div class="method-description">
2361
- <p>
2362
- Obtain the <a href="Node.html#M000122">next</a> sibling node, if any.
2363
- </p>
2364
- <p><a class="source-toggle" href="#"
2365
- onclick="toggleCode('M000122-source');return false;">[Source]</a></p>
2366
- <div class="method-source-code" id="M000122-source">
2367
- <pre>
2368
- /*
2369
- * call-seq:
2370
- * node.next -&gt; XML::Node
2371
- *
2372
- * Obtain the next sibling node, if any.
2373
- */
2374
- VALUE
2375
- ruby_xml_node_next_get(VALUE self) {
2376
-
2377
- </pre>
2378
- </div>
2379
- </div>
2380
- </div>
2381
-
2382
- <div id="method-M000130" class="method-detail">
2383
- <a name="M000130"></a>
2384
-
2385
- <div class="method-heading">
2386
- <a href="#M000130" class="method-signature">
2387
- <span class="method-name">node.next = node<br />
2388
- </span>
2389
- </a>
2390
- </div>
2391
-
2392
- <div class="method-description">
2393
- <p>
2394
- Insert the specified node as this node&#8216;s <a
2395
- href="Node.html#M000122">next</a> sibling.
2396
- </p>
2397
- <p><a class="source-toggle" href="#"
2398
- onclick="toggleCode('M000130-source');return false;">[Source]</a></p>
2399
- <div class="method-source-code" id="M000130-source">
2400
- <pre>
2401
- /*
2402
- * call-seq:
2403
- * node.next = node
2404
- *
2405
- * Insert the specified node as this node's next sibling.
2406
- */
2407
- VALUE
2408
- ruby_xml_node_next_set(VALUE self, VALUE rnode) {
2409
-
2410
- </pre>
2411
- </div>
2412
- </div>
2413
- </div>
2414
-
2415
- <div id="method-M000180" class="method-detail">
2416
- <a name="M000180"></a>
2417
-
2418
- <div class="method-heading">
2419
- <a href="#M000180" class="method-signature">
2420
- <span class="method-name">next?</span><span class="method-args">()</span>
2421
- </a>
2422
- </div>
2423
-
2424
- <div class="method-description">
2425
- <p>
2426
- Determines whether this node has a <a href="Node.html#M000122">next</a>
2427
- node
2428
- </p>
2429
- <p><a class="source-toggle" href="#"
2430
- onclick="toggleCode('M000180-source');return false;">[Source]</a></p>
2431
- <div class="method-source-code" id="M000180-source">
2432
- <pre>
2433
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 87</span>
2434
- 87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">next?</span>
2435
- 88: <span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">next</span>.<span class="ruby-identifier">nil?</span>
2436
- 89: <span class="ruby-keyword kw">end</span>
2437
- </pre>
2438
- </div>
2439
- </div>
2440
- </div>
2441
-
2442
- <div id="method-M000153" class="method-detail">
2443
- <a name="M000153"></a>
2444
-
2445
- <div class="method-heading">
2446
- <a href="#M000153" class="method-signature">
2447
- <span class="method-name">node.type &rarr; num<br />
2448
- </span>
2449
- </a>
2450
- </div>
2451
-
2452
- <div class="method-description">
2453
- <p>
2454
- Obtain this node&#8216;s type identifier.
2455
- </p>
2456
- <p><a class="source-toggle" href="#"
2457
- onclick="toggleCode('M000153-source');return false;">[Source]</a></p>
2458
- <div class="method-source-code" id="M000153-source">
2459
- <pre>
2460
- /*
2461
- * call-seq:
2462
- * node.type -&gt; num
2463
- *
2464
- * Obtain this node's type identifier.
2465
- */
2466
- VALUE
2467
- ruby_xml_node_type(VALUE self) {
2468
-
2469
- </pre>
2470
- </div>
2471
- </div>
2472
- </div>
2473
-
2474
- <div id="method-M000183" class="method-detail">
2475
- <a name="M000183"></a>
2476
-
2477
- <div class="method-heading">
2478
- <a href="#M000183" class="method-signature">
2479
- <span class="method-name">node_type_name</span><span class="method-args">()</span>
2480
- </a>
2481
- </div>
2482
-
2483
- <div class="method-description">
2484
- <p>
2485
- Returns this node&#8216;s type <a href="Node.html#M000148">name</a>
2486
- </p>
2487
- <p><a class="source-toggle" href="#"
2488
- onclick="toggleCode('M000183-source');return false;">[Source]</a></p>
2489
- <div class="method-source-code" id="M000183-source">
2490
- <pre>
2491
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 105</span>
2492
- 105: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">node_type_name</span>
2493
- 106: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">node_type</span>
2494
- 107: <span class="ruby-comment cmt"># Most common choices first</span>
2495
- 108: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ATTRIBUTE_NODE</span><span class="ruby-operator">:</span>
2496
- 109: <span class="ruby-value str">'attribute'</span>
2497
- 110: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">DOCUMENT_NODE</span><span class="ruby-operator">:</span>
2498
- 111: <span class="ruby-value str">'document_xml'</span>
2499
- 112: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ELEMENT_NODE</span><span class="ruby-operator">:</span>
2500
- 113: <span class="ruby-value str">'element'</span>
2501
- 114: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">TEXT_NODE</span><span class="ruby-operator">:</span>
2502
- 115: <span class="ruby-value str">'text'</span>
2503
- 116:
2504
- 117: <span class="ruby-comment cmt"># Now the rest </span>
2505
- 118: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ATTRIBUTE_DECL</span><span class="ruby-operator">:</span>
2506
- 119: <span class="ruby-value str">'attribute_decl'</span>
2507
- 120: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">CDATA_SECTION_NODE</span><span class="ruby-operator">:</span>
2508
- 121: <span class="ruby-value str">'cdata'</span>
2509
- 122: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">COMMENT_NODE</span><span class="ruby-operator">:</span>
2510
- 123: <span class="ruby-value str">'comment'</span>
2511
- 124: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">DOCB_DOCUMENT_NODE</span><span class="ruby-operator">:</span>
2512
- 125: <span class="ruby-value str">'document_docbook'</span>
2513
- 126: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">DOCUMENT_FRAG_NODE</span><span class="ruby-operator">:</span>
2514
- 127: <span class="ruby-value str">'fragment'</span>
2515
- 128: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">DOCUMENT_TYPE_NODE</span><span class="ruby-operator">:</span>
2516
- 129: <span class="ruby-value str">'doctype'</span>
2517
- 130: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">DTD_NODE</span><span class="ruby-operator">:</span>
2518
- 131: <span class="ruby-value str">'dtd'</span>
2519
- 132: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ELEMENT_DECL</span><span class="ruby-operator">:</span>
2520
- 133: <span class="ruby-value str">'elem_decl'</span>
2521
- 134: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ENTITY_DECL</span><span class="ruby-operator">:</span>
2522
- 135: <span class="ruby-value str">'entity_decl'</span>
2523
- 136: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ENTITY_NODE</span><span class="ruby-operator">:</span>
2524
- 137: <span class="ruby-value str">'entity'</span>
2525
- 138: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ENTITY_REF_NODE</span><span class="ruby-operator">:</span>
2526
- 139: <span class="ruby-value str">'entity_ref'</span>
2527
- 140: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">HTML_DOCUMENT_NODE</span><span class="ruby-operator">:</span>
2528
- 141: <span class="ruby-value str">'document_html'</span>
2529
- 142: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">NAMESPACE_DECL</span><span class="ruby-operator">:</span>
2530
- 143: <span class="ruby-value str">'namespace'</span>
2531
- 144: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">NOTATION_NODE</span><span class="ruby-operator">:</span>
2532
- 145: <span class="ruby-value str">'notation'</span>
2533
- 146: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">PI_NODE</span><span class="ruby-operator">:</span>
2534
- 147: <span class="ruby-value str">'pi'</span>
2535
- 148: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">XINCLUDE_START</span><span class="ruby-operator">:</span>
2536
- 149: <span class="ruby-value str">'xinclude_start'</span>
2537
- 150: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">XINCLUDE_END</span><span class="ruby-operator">:</span>
2538
- 151: <span class="ruby-value str">'xinclude_end'</span>
2539
- 152: <span class="ruby-keyword kw">else</span>
2540
- 153: <span class="ruby-identifier">raise</span>(<span class="ruby-constant">UnknownType</span>, <span class="ruby-value str">&quot;Unknown node type: %n&quot;</span>, <span class="ruby-identifier">node</span>.<span class="ruby-identifier">node_type</span>);
2541
- 154: <span class="ruby-keyword kw">end</span>
2542
- 155: <span class="ruby-keyword kw">end</span>
2543
- </pre>
2544
- </div>
2545
- </div>
2546
- </div>
2547
-
2548
- <div id="method-M000199" class="method-detail">
2549
- <a name="M000199"></a>
2550
-
2551
- <div class="method-heading">
2552
- <a href="#M000199" class="method-signature">
2553
- <span class="method-name">notation?</span><span class="method-args">()</span>
2554
- </a>
2555
- </div>
2556
-
2557
- <div class="method-description">
2558
- <p>
2559
- Specifies if this is a notation node
2560
- </p>
2561
- <p><a class="source-toggle" href="#"
2562
- onclick="toggleCode('M000199-source');return false;">[Source]</a></p>
2563
- <div class="method-source-code" id="M000199-source">
2564
- <pre>
2565
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 234</span>
2566
- 234: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">notation?</span>
2567
- 235: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">NOTATION_NODE</span>
2568
- 236: <span class="ruby-keyword kw">end</span>
2569
- </pre>
2570
- </div>
2571
- </div>
2572
- </div>
2573
-
2574
- <div id="method-M000154" class="method-detail">
2575
- <a name="M000154"></a>
2576
-
2577
- <div class="method-heading">
2578
- <a href="#M000154" class="method-signature">
2579
- <span class="method-name">node.namespace &rarr; [namespace, ..., namespace]<br />
2580
- </span>
2581
- </a>
2582
- </div>
2583
-
2584
- <div class="method-description">
2585
- <p>
2586
- Obtain an array of +<a href="NS.html">XML::NS</a>+ objects representing
2587
- this node&#8216;s xmlns <a href="Node.html#M000132">attributes</a>
2588
- </p>
2589
- <p><a class="source-toggle" href="#"
2590
- onclick="toggleCode('M000154-source');return false;">[Source]</a></p>
2591
- <div class="method-source-code" id="M000154-source">
2592
- <pre>
2593
- /*
2594
- * call-seq:
2595
- * node.namespace -&gt; [namespace, ..., namespace]
2596
- *
2597
- * Obtain an array of +XML::NS+ objects representing
2598
- * this node's xmlns attributes
2599
- */
2600
- VALUE
2601
- ruby_xml_node_namespace_get(VALUE self) {
2602
-
2603
- </pre>
2604
- </div>
2605
- </div>
2606
- </div>
2607
-
2608
- <div id="method-M000155" class="method-detail">
2609
- <a name="M000155"></a>
2610
-
2611
- <div class="method-heading">
2612
- <a href="#M000155" class="method-signature">
2613
- <span class="method-name">node.ns? &rarr; (true|false)<br />
2614
- </span>
2615
- </a>
2616
- </div>
2617
-
2618
- <div class="method-description">
2619
- <p>
2620
- Determine whether this node has a <a
2621
- href="Node.html#M000150">namespace</a>.
2622
- </p>
2623
- <p><a class="source-toggle" href="#"
2624
- onclick="toggleCode('M000155-source');return false;">[Source]</a></p>
2625
- <div class="method-source-code" id="M000155-source">
2626
- <pre>
2627
- /*
2628
- * call-seq:
2629
- * node.ns? -&gt; (true|false)
2630
- *
2631
- * Determine whether this node has a namespace.
2632
- */
2633
- VALUE
2634
- ruby_xml_node_ns_q(VALUE self) {
2635
-
2636
- </pre>
2637
- </div>
2638
- </div>
2639
- </div>
2640
-
2641
- <div id="method-M000157" class="method-detail">
2642
- <a name="M000157"></a>
2643
-
2644
- <div class="method-heading">
2645
- <a href="#M000157" class="method-signature">
2646
- <span class="method-name">node.ns_def &rarr; namespace<br />
2647
- </span>
2648
- </a>
2649
- </div>
2650
-
2651
- <div class="method-description">
2652
- <p>
2653
- Obtain this node&#8216;s default <a href="Node.html#M000150">namespace</a>.
2654
- </p>
2655
- <p><a class="source-toggle" href="#"
2656
- onclick="toggleCode('M000157-source');return false;">[Source]</a></p>
2657
- <div class="method-source-code" id="M000157-source">
2658
- <pre>
2659
- /*
2660
- * call-seq:
2661
- * node.ns_def -&gt; namespace
2662
- *
2663
- * Obtain this node's default namespace.
2664
- */
2665
- VALUE
2666
- ruby_xml_node_ns_def_get(VALUE self) {
2667
-
2668
- </pre>
2669
- </div>
2670
- </div>
2671
- </div>
2672
-
2673
- <div id="method-M000156" class="method-detail">
2674
- <a name="M000156"></a>
2675
-
2676
- <div class="method-heading">
2677
- <a href="#M000156" class="method-signature">
2678
- <span class="method-name">node.ns_def? &rarr; (true|false)<br />
2679
- </span>
2680
- </a>
2681
- </div>
2682
-
2683
- <div class="method-description">
2684
- <p>
2685
- Obtain an array of +<a href="NS.html">XML::NS</a>+ objects representing
2686
- this node&#8216;s xmlns <a href="Node.html#M000132">attributes</a>
2687
- </p>
2688
- <p><a class="source-toggle" href="#"
2689
- onclick="toggleCode('M000156-source');return false;">[Source]</a></p>
2690
- <div class="method-source-code" id="M000156-source">
2691
- <pre>
2692
- /*
2693
- * call-seq:
2694
- * node.ns_def? -&gt; (true|false)
2695
- *
2696
- * Obtain an array of +XML::NS+ objects representing
2697
- * this node's xmlns attributes
2698
- */
2699
- VALUE
2700
- ruby_xml_node_ns_def_q(VALUE self) {
2701
-
2702
- </pre>
2703
- </div>
2704
- </div>
2705
- </div>
2706
-
2707
- <div id="method-M000123" class="method-detail">
2708
- <a name="M000123"></a>
2709
-
2710
- <div class="method-heading">
2711
- <a href="#M000123" class="method-signature">
2712
- <span class="method-name">node.parent &rarr; XML::Node<br />
2713
- </span>
2714
- </a>
2715
- </div>
2716
-
2717
- <div class="method-description">
2718
- <p>
2719
- Obtain this node&#8216;s <a href="Node.html#M000123">parent</a> node, if
2720
- any.
2721
- </p>
2722
- <p><a class="source-toggle" href="#"
2723
- onclick="toggleCode('M000123-source');return false;">[Source]</a></p>
2724
- <div class="method-source-code" id="M000123-source">
2725
- <pre>
2726
- /*
2727
- * call-seq:
2728
- * node.parent -&gt; XML::Node
2729
- *
2730
- * Obtain this node's parent node, if any.
2731
- */
2732
- VALUE
2733
- ruby_xml_node_parent_get(VALUE self) {
2734
-
2735
- </pre>
2736
- </div>
2737
- </div>
2738
- </div>
2739
-
2740
- <div id="method-M000177" class="method-detail">
2741
- <a name="M000177"></a>
2742
-
2743
- <div class="method-heading">
2744
- <a href="#M000177" class="method-signature">
2745
- <span class="method-name">parent?</span><span class="method-args">()</span>
2746
- </a>
2747
- </div>
2748
-
2749
- <div class="method-description">
2750
- <p>
2751
- Determines whether this node has a <a href="Node.html#M000123">parent</a>
2752
- node
2753
- </p>
2754
- <p><a class="source-toggle" href="#"
2755
- onclick="toggleCode('M000177-source');return false;">[Source]</a></p>
2756
- <div class="method-source-code" id="M000177-source">
2757
- <pre>
2758
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 72</span>
2759
- 72: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parent?</span>
2760
- 73: <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">parent</span>.<span class="ruby-identifier">nil?</span>
2761
- 74: <span class="ruby-keyword kw">end</span>
2762
- </pre>
2763
- </div>
2764
- </div>
2765
- </div>
2766
-
2767
- <div id="method-M000158" class="method-detail">
2768
- <a name="M000158"></a>
2769
-
2770
- <div class="method-heading">
2771
- <a href="#M000158" class="method-signature">
2772
- <span class="method-name">node.path &rarr; path<br />
2773
- </span>
2774
- </a>
2775
- </div>
2776
-
2777
- <div class="method-description">
2778
- <p>
2779
- Obtain this node&#8216;s <a href="Node.html#M000158">path</a>.
2780
- </p>
2781
- <p><a class="source-toggle" href="#"
2782
- onclick="toggleCode('M000158-source');return false;">[Source]</a></p>
2783
- <div class="method-source-code" id="M000158-source">
2784
- <pre>
2785
- /*
2786
- * call-seq:
2787
- * node.path -&gt; path
2788
- *
2789
- * Obtain this node's path.
2790
- */
2791
- VALUE
2792
- ruby_xml_node_path(VALUE self) {
2793
-
2794
- </pre>
2795
- </div>
2796
- </div>
2797
- </div>
2798
-
2799
- <div id="method-M000200" class="method-detail">
2800
- <a name="M000200"></a>
2801
-
2802
- <div class="method-heading">
2803
- <a href="#M000200" class="method-signature">
2804
- <span class="method-name">pi?</span><span class="method-args">()</span>
2805
- </a>
2806
- </div>
2807
-
2808
- <div class="method-description">
2809
- <p>
2810
- Specifies if this is a processiong instruction node
2811
- </p>
2812
- <p><a class="source-toggle" href="#"
2813
- onclick="toggleCode('M000200-source');return false;">[Source]</a></p>
2814
- <div class="method-source-code" id="M000200-source">
2815
- <pre>
2816
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 239</span>
2817
- 239: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pi?</span>
2818
- 240: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">PI_NODE</span>
2819
- 241: <span class="ruby-keyword kw">end</span>
2820
- </pre>
2821
- </div>
2822
- </div>
2823
- </div>
2824
-
2825
- <div id="method-M000159" class="method-detail">
2826
- <a name="M000159"></a>
2827
-
2828
- <div class="method-heading">
2829
- <a href="#M000159" class="method-signature">
2830
- <span class="method-name">node.pointer &rarr; XML::Node_set<br />
2831
- </span>
2832
- </a>
2833
- </div>
2834
-
2835
- <div class="method-description">
2836
- <p>
2837
- Evaluates an <a href="XPointer.html">XPointer</a> expression relative to
2838
- this node.
2839
- </p>
2840
- <p><a class="source-toggle" href="#"
2841
- onclick="toggleCode('M000159-source');return false;">[Source]</a></p>
2842
- <div class="method-source-code" id="M000159-source">
2843
- <pre>
2844
- /*
2845
- * call-seq:
2846
- * node.pointer -&gt; XML::Node_set
2847
- *
2848
- * Evaluates an XPointer expression relative to this node.
2849
- */
2850
- VALUE
2851
- ruby_xml_node_pointer(VALUE self, VALUE xptr_str) {
2852
-
2853
- </pre>
2854
- </div>
2855
- </div>
2856
- </div>
2857
-
2858
- <div id="method-M000124" class="method-detail">
2859
- <a name="M000124"></a>
2860
-
2861
- <div class="method-heading">
2862
- <a href="#M000124" class="method-signature">
2863
- <span class="method-name">node.prev &rarr; XML::Node<br />
2864
- </span>
2865
- </a>
2866
- </div>
2867
-
2868
- <div class="method-description">
2869
- <p>
2870
- Obtain the previous sibling, if any.
2871
- </p>
2872
- <p><a class="source-toggle" href="#"
2873
- onclick="toggleCode('M000124-source');return false;">[Source]</a></p>
2874
- <div class="method-source-code" id="M000124-source">
2875
- <pre>
2876
- /*
2877
- * call-seq:
2878
- * node.prev -&gt; XML::Node
2879
- *
2880
- * Obtain the previous sibling, if any.
2881
- */
2882
- VALUE
2883
- ruby_xml_node_prev_get(VALUE self) {
2884
-
2885
- </pre>
2886
- </div>
2887
- </div>
2888
- </div>
2889
-
2890
- <div id="method-M000131" class="method-detail">
2891
- <a name="M000131"></a>
2892
-
2893
- <div class="method-heading">
2894
- <a href="#M000131" class="method-signature">
2895
- <span class="method-name">node.prev = node<br />
2896
- </span>
2897
- </a>
2898
- </div>
2899
-
2900
- <div class="method-description">
2901
- <p>
2902
- Insert the specified node as this node&#8216;s previous sibling.
2903
- </p>
2904
- <p><a class="source-toggle" href="#"
2905
- onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
2906
- <div class="method-source-code" id="M000131-source">
2907
- <pre>
2908
- /*
2909
- * call-seq:
2910
- * node.prev = node
2911
- *
2912
- * Insert the specified node as this node's previous sibling.
2913
- */
2914
- VALUE
2915
- ruby_xml_node_prev_set(VALUE self, VALUE rnode) {
2916
-
2917
- </pre>
2918
- </div>
2919
- </div>
2920
- </div>
2921
-
2922
- <div id="method-M000181" class="method-detail">
2923
- <a name="M000181"></a>
2924
-
2925
- <div class="method-heading">
2926
- <a href="#M000181" class="method-signature">
2927
- <span class="method-name">prev?</span><span class="method-args">()</span>
2928
- </a>
2929
- </div>
2930
-
2931
- <div class="method-description">
2932
- <p>
2933
- Determines whether this node has a previous node
2934
- </p>
2935
- <p><a class="source-toggle" href="#"
2936
- onclick="toggleCode('M000181-source');return false;">[Source]</a></p>
2937
- <div class="method-source-code" id="M000181-source">
2938
- <pre>
2939
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 92</span>
2940
- 92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prev?</span>
2941
- 93: <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">prev</span>.<span class="ruby-identifier">nil?</span>
2942
- 94: <span class="ruby-keyword kw">end</span>
2943
- </pre>
2944
- </div>
2945
- </div>
2946
- </div>
2947
-
2948
- <div id="method-M000208" class="method-detail">
2949
- <a name="M000208"></a>
2950
-
2951
- <div class="method-heading">
2952
- <span class="method-name">properties</span><span class="method-args">()</span>
2953
- </div>
2954
-
2955
- <div class="method-description">
2956
- <p>
2957
- Alias for <a href="Node.html#M000132">attributes</a>
2958
- </p>
2959
- </div>
2960
- </div>
2961
-
2962
- <div id="method-M000209" class="method-detail">
2963
- <a name="M000209"></a>
2964
-
2965
- <div class="method-heading">
2966
- <span class="method-name">properties?</span><span class="method-args">()</span>
2967
- </div>
2968
-
2969
- <div class="method-description">
2970
- <p>
2971
- Alias for <a href="Node.html#M000132">attributes</a>?
2972
- </p>
2973
- </div>
2974
- </div>
2975
-
2976
- <div id="method-M000160" class="method-detail">
2977
- <a name="M000160"></a>
2978
-
2979
- <div class="method-heading">
2980
- <a href="#M000160" class="method-signature">
2981
- <span class="method-name">node.remove! &rarr; nil<br />
2982
- </span>
2983
- </a>
2984
- </div>
2985
-
2986
- <div class="method-description">
2987
- <p>
2988
- Removes this node from it&#8216;s <a href="Node.html#M000123">parent</a>.
2989
- </p>
2990
- <p><a class="source-toggle" href="#"
2991
- onclick="toggleCode('M000160-source');return false;">[Source]</a></p>
2992
- <div class="method-source-code" id="M000160-source">
2993
- <pre>
2994
- /*
2995
- * call-seq:
2996
- * node.remove! -&gt; nil
2997
- *
2998
- * Removes this node from it's parent.
2999
- */
3000
- VALUE
3001
- ruby_xml_node_remove_ex(VALUE self) {
3002
-
3003
- </pre>
3004
- </div>
3005
- </div>
3006
- </div>
3007
-
3008
- <div id="method-M000162" class="method-detail">
3009
- <a name="M000162"></a>
3010
-
3011
- <div class="method-heading">
3012
- <a href="#M000162" class="method-signature">
3013
- <span class="method-name">node.search_href &rarr; namespace<br />
3014
- </span>
3015
- </a>
3016
- </div>
3017
-
3018
- <div class="method-description">
3019
- <p>
3020
- Search for a <a href="Node.html#M000150">namespace</a> by href.
3021
- </p>
3022
- <p><a class="source-toggle" href="#"
3023
- onclick="toggleCode('M000162-source');return false;">[Source]</a></p>
3024
- <div class="method-source-code" id="M000162-source">
3025
- <pre>
3026
- /*
3027
- * call-seq:
3028
- * node.search_href -&gt; namespace
3029
- *
3030
- * Search for a namespace by href.
3031
- */
3032
- VALUE
3033
- ruby_xml_node_search_href(VALUE self, VALUE href) {
3034
-
3035
- </pre>
3036
- </div>
3037
- </div>
3038
- </div>
3039
-
3040
- <div id="method-M000161" class="method-detail">
3041
- <a name="M000161"></a>
3042
-
3043
- <div class="method-heading">
3044
- <a href="#M000161" class="method-signature">
3045
- <span class="method-name">node.search_ns &rarr; namespace<br />
3046
- </span>
3047
- </a>
3048
- </div>
3049
-
3050
- <div class="method-description">
3051
- <p>
3052
- Search for a <a href="Node.html#M000150">namespace</a> by <a
3053
- href="Node.html#M000150">namespace</a>.
3054
- </p>
3055
- <p><a class="source-toggle" href="#"
3056
- onclick="toggleCode('M000161-source');return false;">[Source]</a></p>
3057
- <div class="method-source-code" id="M000161-source">
3058
- <pre>
3059
- /*
3060
- * call-seq:
3061
- * node.search_ns -&gt; namespace
3062
- *
3063
- * Search for a namespace by namespace.
3064
- */
3065
- VALUE
3066
- ruby_xml_node_search_ns(VALUE self, VALUE ns) {
3067
-
3068
- </pre>
3069
- </div>
3070
- </div>
3071
- </div>
3072
-
3073
- <div id="method-M000129" class="method-detail">
3074
- <a name="M000129"></a>
3075
-
3076
- <div class="method-heading">
3077
- <a href="#M000129" class="method-signature">
3078
- <span class="method-name">node.sibling(node) &rarr; XML::Node<br />
3079
- </span>
3080
- </a>
3081
- </div>
3082
-
3083
- <div class="method-description">
3084
- <p>
3085
- Add the specified node as a sibling of this node.
3086
- </p>
3087
- <p><a class="source-toggle" href="#"
3088
- onclick="toggleCode('M000129-source');return false;">[Source]</a></p>
3089
- <div class="method-source-code" id="M000129-source">
3090
- <pre>
3091
- /*
3092
- * call-seq:
3093
- * node.sibling(node) -&gt; XML::Node
3094
- *
3095
- * Add the specified node as a sibling of this node.
3096
- */
3097
- VALUE
3098
- ruby_xml_node_sibling_set(VALUE self, VALUE rnode) {
3099
-
3100
- </pre>
3101
- </div>
3102
- </div>
3103
- </div>
3104
-
3105
- <div id="method-M000163" class="method-detail">
3106
- <a name="M000163"></a>
3107
-
3108
- <div class="method-heading">
3109
- <a href="#M000163" class="method-signature">
3110
- <span class="method-name">node.space_preserve &rarr; (true|false)<br />
3111
- </span>
3112
- </a>
3113
- </div>
3114
-
3115
- <div class="method-description">
3116
- <p>
3117
- Determine whether this node preserves whitespace.
3118
- </p>
3119
- <p><a class="source-toggle" href="#"
3120
- onclick="toggleCode('M000163-source');return false;">[Source]</a></p>
3121
- <div class="method-source-code" id="M000163-source">
3122
- <pre>
3123
- /*
3124
- * call-seq:
3125
- * node.space_preserve -&gt; (true|false)
3126
- *
3127
- * Determine whether this node preserves whitespace.
3128
- */
3129
- VALUE
3130
- ruby_xml_node_space_preserve_get(VALUE self) {
3131
-
3132
- </pre>
3133
- </div>
3134
- </div>
3135
- </div>
3136
-
3137
- <div id="method-M000164" class="method-detail">
3138
- <a name="M000164"></a>
3139
-
3140
- <div class="method-heading">
3141
- <a href="#M000164" class="method-signature">
3142
- <span class="method-name">node.space_preserve = true|false<br />
3143
- </span>
3144
- </a>
3145
- </div>
3146
-
3147
- <div class="method-description">
3148
- <p>
3149
- Control whether this node preserves whitespace.
3150
- </p>
3151
- <p><a class="source-toggle" href="#"
3152
- onclick="toggleCode('M000164-source');return false;">[Source]</a></p>
3153
- <div class="method-source-code" id="M000164-source">
3154
- <pre>
3155
- /*
3156
- * call-seq:
3157
- * node.space_preserve = true|false
3158
- *
3159
- * Control whether this node preserves whitespace.
3160
- */
3161
- VALUE
3162
- ruby_xml_node_space_preserve_set(VALUE self, VALUE bool) {
3163
-
3164
- </pre>
3165
- </div>
3166
- </div>
3167
- </div>
3168
-
3169
- <div id="method-M000201" class="method-detail">
3170
- <a name="M000201"></a>
3171
-
3172
- <div class="method-heading">
3173
- <a href="#M000201" class="method-signature">
3174
- <span class="method-name">text?</span><span class="method-args">()</span>
3175
- </a>
3176
- </div>
3177
-
3178
- <div class="method-description">
3179
- <p>
3180
- Specifies if this is a text node
3181
- </p>
3182
- <p><a class="source-toggle" href="#"
3183
- onclick="toggleCode('M000201-source');return false;">[Source]</a></p>
3184
- <div class="method-source-code" id="M000201-source">
3185
- <pre>
3186
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 244</span>
3187
- 244: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">text?</span>
3188
- 245: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">TEXT_NODE</span>
3189
- 246: <span class="ruby-keyword kw">end</span>
3190
- </pre>
3191
- </div>
3192
- </div>
3193
- </div>
3194
-
3195
- <div id="method-M000165" class="method-detail">
3196
- <a name="M000165"></a>
3197
-
3198
- <div class="method-heading">
3199
- <a href="#M000165" class="method-signature">
3200
- <span class="method-name">node.to_s &rarr; "string"<br />
3201
- </span>
3202
- </a>
3203
- </div>
3204
-
3205
- <div class="method-description">
3206
- <p>
3207
- Coerce this node to a string representation of it&#8216;s <a
3208
- href="../XML.html">XML</a>.
3209
- </p>
3210
- <p><a class="source-toggle" href="#"
3211
- onclick="toggleCode('M000165-source');return false;">[Source]</a></p>
3212
- <div class="method-source-code" id="M000165-source">
3213
- <pre>
3214
- /*
3215
- * call-seq:
3216
- * node.to_s -&gt; &quot;string&quot;
3217
- *
3218
- * Coerce this node to a string representation of
3219
- * it's XML.
3220
- */
3221
- VALUE
3222
- ruby_xml_node_to_s(VALUE self) {
3223
-
3224
- </pre>
3225
- </div>
3226
- </div>
3227
- </div>
3228
-
3229
- <div id="method-M000202" class="method-detail">
3230
- <a name="M000202"></a>
3231
-
3232
- <div class="method-heading">
3233
- <a href="#M000202" class="method-signature">
3234
- <span class="method-name">xinclude_end?</span><span class="method-args">()</span>
3235
- </a>
3236
- </div>
3237
-
3238
- <div class="method-description">
3239
- <p>
3240
- Specifies if this is an xinclude end node
3241
- </p>
3242
- <p><a class="source-toggle" href="#"
3243
- onclick="toggleCode('M000202-source');return false;">[Source]</a></p>
3244
- <div class="method-source-code" id="M000202-source">
3245
- <pre>
3246
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 249</span>
3247
- 249: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xinclude_end?</span>
3248
- 250: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">XINCLUDE_END</span>
3249
- 251: <span class="ruby-keyword kw">end</span>
3250
- </pre>
3251
- </div>
3252
- </div>
3253
- </div>
3254
-
3255
- <div id="method-M000203" class="method-detail">
3256
- <a name="M000203"></a>
3257
-
3258
- <div class="method-heading">
3259
- <a href="#M000203" class="method-signature">
3260
- <span class="method-name">xinclude_start?</span><span class="method-args">()</span>
3261
- </a>
3262
- </div>
3263
-
3264
- <div class="method-description">
3265
- <p>
3266
- Specifies if this is an xinclude start node
3267
- </p>
3268
- <p><a class="source-toggle" href="#"
3269
- onclick="toggleCode('M000203-source');return false;">[Source]</a></p>
3270
- <div class="method-source-code" id="M000203-source">
3271
- <pre>
3272
- <span class="ruby-comment cmt"># File lib/libxml/node.rb, line 254</span>
3273
- 254: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xinclude_start?</span>
3274
- 255: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">XINCLUDE_START</span>
3275
- 256: <span class="ruby-keyword kw">end</span>
3276
- </pre>
3277
- </div>
3278
- </div>
3279
- </div>
3280
-
3281
- <div id="method-M000166" class="method-detail">
3282
- <a name="M000166"></a>
3283
-
3284
- <div class="method-heading">
3285
- <a href="#M000166" class="method-signature">
3286
- <span class="method-name">node.xlink? &rarr; (true|false)<br />
3287
- </span>
3288
- </a>
3289
- </div>
3290
-
3291
- <div class="method-description">
3292
- <p>
3293
- Determine whether this node is an xlink node.
3294
- </p>
3295
- <p><a class="source-toggle" href="#"
3296
- onclick="toggleCode('M000166-source');return false;">[Source]</a></p>
3297
- <div class="method-source-code" id="M000166-source">
3298
- <pre>
3299
- /*
3300
- * call-seq:
3301
- * node.xlink? -&gt; (true|false)
3302
- *
3303
- * Determine whether this node is an xlink node.
3304
- */
3305
- VALUE
3306
- ruby_xml_node_xlink_q(VALUE self) {
3307
-
3308
- </pre>
3309
- </div>
3310
- </div>
3311
- </div>
3312
-
3313
- <div id="method-M000167" class="method-detail">
3314
- <a name="M000167"></a>
3315
-
3316
- <div class="method-heading">
3317
- <a href="#M000167" class="method-signature">
3318
- <span class="method-name">node.xlink_type &rarr; num<br />
3319
- </span>
3320
- </a>
3321
- </div>
3322
-
3323
- <div class="method-description">
3324
- <p>
3325
- Obtain the type identifier for this xlink, if applicable. If this is not an
3326
- xlink node (see +<a href="Node.html#M000166">xlink?</a>+), will return nil.
3327
- </p>
3328
- <p><a class="source-toggle" href="#"
3329
- onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
3330
- <div class="method-source-code" id="M000167-source">
3331
- <pre>
3332
- /*
3333
- * call-seq:
3334
- * node.xlink_type -&gt; num
3335
- *
3336
- * Obtain the type identifier for this xlink, if applicable.
3337
- * If this is not an xlink node (see +xlink?+), will return
3338
- * nil.
3339
- */
3340
- VALUE
3341
- ruby_xml_node_xlink_type(VALUE self) {
3342
-
3343
- </pre>
3344
- </div>
3345
- </div>
3346
- </div>
3347
-
3348
- <div id="method-M000168" class="method-detail">
3349
- <a name="M000168"></a>
3350
-
3351
- <div class="method-heading">
3352
- <a href="#M000168" class="method-signature">
3353
- <span class="method-name">node.xlink_type_name &rarr; "string"<br />
3354
- </span>
3355
- </a>
3356
- </div>
3357
-
3358
- <div class="method-description">
3359
- <p>
3360
- Obtain the type <a href="Node.html#M000148">name</a> for this xlink, if
3361
- applicable. If this is not an xlink node (see +<a
3362
- href="Node.html#M000166">xlink?</a>+), will return nil.
3363
- </p>
3364
- <p><a class="source-toggle" href="#"
3365
- onclick="toggleCode('M000168-source');return false;">[Source]</a></p>
3366
- <div class="method-source-code" id="M000168-source">
3367
- <pre>
3368
- /*
3369
- * call-seq:
3370
- * node.xlink_type_name -&gt; &quot;string&quot;
3371
- *
3372
- * Obtain the type name for this xlink, if applicable.
3373
- * If this is not an xlink node (see +xlink?+), will return
3374
- * nil.
3375
- */
3376
- VALUE
3377
- ruby_xml_node_xlink_type_name(VALUE self) {
3378
-
3379
- </pre>
3380
- </div>
3381
- </div>
3382
- </div>
3383
-
3384
-
3385
- </div>
3386
-
3387
-
3388
- </div>
3389
-
3390
-
3391
- <div id="validator-badges">
3392
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
3393
- </div>
3394
-
3395
- </body>
3396
- </html>