libxml-ruby 0.8.3-x86-mswin32-60 → 0.9.0-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) 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/{lib → ext/mingw}/libiconv-2.dll +0 -0
  43. data/ext/mingw/libxml2-2.dll +0 -0
  44. data/ext/mingw/libxml_ruby.dll.a +0 -0
  45. data/ext/mingw/libxml_ruby.so +0 -0
  46. data/ext/vc/libxml_ruby.vcproj +23 -15
  47. data/lib/libxml.rb +8 -2
  48. data/lib/libxml/document.rb +16 -4
  49. data/lib/libxml/error.rb +84 -0
  50. data/lib/libxml/hpricot.rb +76 -0
  51. data/lib/libxml/html_parser.rb +61 -0
  52. data/lib/libxml/node.rb +36 -25
  53. data/lib/libxml/parser.rb +312 -33
  54. data/lib/libxml/parser_context.rb +17 -0
  55. data/lib/libxml/properties.rb +15 -2
  56. data/lib/libxml/reader.rb +15 -0
  57. data/lib/libxml/sax_callbacks.rb +179 -0
  58. data/lib/libxml/sax_parser.rb +42 -0
  59. data/lib/libxml/tree.rb +1 -2
  60. data/lib/libxml/xpath_object.rb +12 -0
  61. data/test/model/atom.xml +4 -0
  62. data/test/tc_attributes.rb +43 -19
  63. data/test/tc_document.rb +1 -1
  64. data/test/tc_document_write.rb +15 -8
  65. data/test/tc_dtd.rb +36 -20
  66. data/test/tc_encoding.rb +13 -0
  67. data/test/tc_error.rb +136 -0
  68. data/test/tc_node.rb +2 -3
  69. data/test/tc_node_copy.rb +1 -1
  70. data/test/tc_node_edit.rb +6 -0
  71. data/test/tc_ns.rb +18 -0
  72. data/test/tc_parser.rb +113 -228
  73. data/test/tc_parser_context.rb +1 -2
  74. data/test/tc_reader.rb +24 -14
  75. data/test/tc_relaxng.rb +18 -6
  76. data/test/tc_sax_parser.rb +48 -13
  77. data/test/tc_schema.rb +20 -8
  78. data/test/tc_well_formed.rb +2 -1
  79. data/test/tc_xml.rb +212 -0
  80. data/test/tc_xpath.rb +60 -46
  81. data/test/tc_xpointer.rb +7 -11
  82. data/test/test_suite.rb +4 -3
  83. metadata +32 -115
  84. data/doc/rdoc/classes/LibXML.html +0 -241
  85. data/doc/rdoc/classes/LibXML/XML.html +0 -185
  86. data/doc/rdoc/classes/LibXML/XML/Attr.html +0 -1010
  87. data/doc/rdoc/classes/LibXML/XML/Attributes.html +0 -526
  88. data/doc/rdoc/classes/LibXML/XML/Document.html +0 -1489
  89. data/doc/rdoc/classes/LibXML/XML/Dtd.html +0 -213
  90. data/doc/rdoc/classes/LibXML/XML/Error.html +0 -117
  91. data/doc/rdoc/classes/LibXML/XML/HTMLParser.html +0 -348
  92. data/doc/rdoc/classes/LibXML/XML/InputCallbacks.html +0 -160
  93. data/doc/rdoc/classes/LibXML/XML/NS.html +0 -381
  94. data/doc/rdoc/classes/LibXML/XML/Node.html +0 -3396
  95. data/doc/rdoc/classes/LibXML/XML/Node/FailedModify.html +0 -123
  96. data/doc/rdoc/classes/LibXML/XML/Node/Set.html +0 -440
  97. data/doc/rdoc/classes/LibXML/XML/Node/SetNamespace.html +0 -123
  98. data/doc/rdoc/classes/LibXML/XML/Node/UnknownType.html +0 -123
  99. data/doc/rdoc/classes/LibXML/XML/Parser.html +0 -2239
  100. data/doc/rdoc/classes/LibXML/XML/Parser/Context.html +0 -1255
  101. data/doc/rdoc/classes/LibXML/XML/Parser/ParseError.html +0 -123
  102. data/doc/rdoc/classes/LibXML/XML/Reader.html +0 -2264
  103. data/doc/rdoc/classes/LibXML/XML/RelaxNG.html +0 -237
  104. data/doc/rdoc/classes/LibXML/XML/SaxParser.html +0 -415
  105. data/doc/rdoc/classes/LibXML/XML/Schema.html +0 -308
  106. data/doc/rdoc/classes/LibXML/XML/State.html +0 -124
  107. data/doc/rdoc/classes/LibXML/XML/Tree.html +0 -111
  108. data/doc/rdoc/classes/LibXML/XML/XInclude.html +0 -123
  109. data/doc/rdoc/classes/LibXML/XML/XInclude/Error.html +0 -117
  110. data/doc/rdoc/classes/LibXML/XML/XMLParserOptions.html +0 -198
  111. data/doc/rdoc/classes/LibXML/XML/XPath.html +0 -184
  112. data/doc/rdoc/classes/LibXML/XML/XPath/Context.html +0 -404
  113. data/doc/rdoc/classes/LibXML/XML/XPath/InvalidPath.html +0 -172
  114. data/doc/rdoc/classes/LibXML/XML/XPath/Object.html +0 -627
  115. data/doc/rdoc/classes/LibXML/XML/XPointer.html +0 -170
  116. data/doc/rdoc/classes/LibXML/XML/XPointer/Context.html +0 -123
  117. data/doc/rdoc/classes/LibXML/XML/XPointer/Context/InvalidPath.html +0 -117
  118. data/doc/rdoc/classes/LibXML/XML/XPointer/InvalidExpression.html +0 -124
  119. data/doc/rdoc/classes/singleton.html +0 -114
  120. data/doc/rdoc/created.rid +0 -1
  121. data/doc/rdoc/files/CHANGES.html +0 -442
  122. data/doc/rdoc/files/LICENSE.html +0 -133
  123. data/doc/rdoc/files/README.html +0 -388
  124. data/doc/rdoc/files/VERSION.html +0 -107
  125. data/doc/rdoc/files/ext/libxml/cbg_c.html +0 -101
  126. data/doc/rdoc/files/ext/libxml/libxml_c.html +0 -101
  127. data/doc/rdoc/files/ext/libxml/ruby_xml_attr_c.html +0 -101
  128. data/doc/rdoc/files/ext/libxml/ruby_xml_attributes_c.html +0 -101
  129. data/doc/rdoc/files/ext/libxml/ruby_xml_document_c.html +0 -101
  130. data/doc/rdoc/files/ext/libxml/ruby_xml_dtd_c.html +0 -101
  131. data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_c.html +0 -101
  132. data/doc/rdoc/files/ext/libxml/ruby_xml_input_cbg_c.html +0 -101
  133. data/doc/rdoc/files/ext/libxml/ruby_xml_node_c.html +0 -101
  134. data/doc/rdoc/files/ext/libxml/ruby_xml_node_set_c.html +0 -101
  135. data/doc/rdoc/files/ext/libxml/ruby_xml_ns_c.html +0 -101
  136. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_c.html +0 -101
  137. data/doc/rdoc/files/ext/libxml/ruby_xml_parser_context_c.html +0 -101
  138. data/doc/rdoc/files/ext/libxml/ruby_xml_reader_c.html +0 -101
  139. data/doc/rdoc/files/ext/libxml/ruby_xml_relaxng_c.html +0 -101
  140. data/doc/rdoc/files/ext/libxml/ruby_xml_sax_parser_c.html +0 -101
  141. data/doc/rdoc/files/ext/libxml/ruby_xml_schema_c.html +0 -101
  142. data/doc/rdoc/files/ext/libxml/ruby_xml_state_c.html +0 -101
  143. data/doc/rdoc/files/ext/libxml/ruby_xml_xinclude_c.html +0 -101
  144. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_c.html +0 -101
  145. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_context_c.html +0 -101
  146. data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_object_c.html +0 -101
  147. data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_c.html +0 -101
  148. data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_context_c.html +0 -101
  149. data/doc/rdoc/files/lib/libxml/attr_rb.html +0 -108
  150. data/doc/rdoc/files/lib/libxml/attributes_rb.html +0 -108
  151. data/doc/rdoc/files/lib/libxml/document_rb.html +0 -108
  152. data/doc/rdoc/files/lib/libxml/node_rb.html +0 -108
  153. data/doc/rdoc/files/lib/libxml/node_set_rb.html +0 -108
  154. data/doc/rdoc/files/lib/libxml/parser_options_rb.html +0 -107
  155. data/doc/rdoc/files/lib/libxml/parser_rb.html +0 -101
  156. data/doc/rdoc/files/lib/libxml/properties_rb.html +0 -108
  157. data/doc/rdoc/files/lib/libxml/tree_rb.html +0 -107
  158. data/doc/rdoc/files/lib/libxml_rb.html +0 -124
  159. data/doc/rdoc/files/lib/xml/libxml_rb.html +0 -124
  160. data/doc/rdoc/files/lib/xml_rb.html +0 -134
  161. data/doc/rdoc/fr_class_index.html +0 -62
  162. data/doc/rdoc/fr_file_index.html +0 -66
  163. data/doc/rdoc/fr_method_index.html +0 -392
  164. data/doc/rdoc/index.html +0 -24
  165. data/doc/rdoc/rdoc-style.css +0 -208
  166. data/ext/libxml/ruby_xml_node_set.c +0 -172
  167. data/ext/libxml/ruby_xml_node_set.h +0 -20
  168. data/ext/libxml/ruby_xml_xpointer_context.c +0 -22
  169. data/ext/libxml/ruby_xml_xpointer_context.h +0 -18
  170. data/lib/libxml/node_set.rb +0 -27
  171. data/lib/libxml2-2.dll +0 -0
  172. data/lib/libxml_ruby.dll.a +0 -0
  173. data/lib/libxml_ruby.so +0 -0
  174. data/test/tc_node_set.rb +0 -24
  175. data/test/tc_node_set2.rb +0 -37
@@ -1,627 +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::XPath::Object</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::XPath::Object</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../../files/ext/libxml/ruby_xml_xpath_c.html">
59
- ext/libxml/ruby_xml_xpath.c
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="Object.html">
69
- Object
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
- <div id="description">
84
- <p>
85
- A collection of nodes returned from the evaluation of an <a
86
- href="../XPath.html">XML::XPath</a> or <a
87
- href="../XPointer.html">XML::XPointer</a> expression.
88
- </p>
89
-
90
- </div>
91
-
92
-
93
- </div>
94
-
95
- <div id="method-list">
96
- <h3 class="section-bar">Methods</h3>
97
-
98
- <div class="name-list">
99
- <a href="#M000014">[]</a>&nbsp;&nbsp;
100
- <a href="#M000016">debug</a>&nbsp;&nbsp;
101
- <a href="#M000007">each</a>&nbsp;&nbsp;
102
- <a href="#M000009">empty?</a>&nbsp;&nbsp;
103
- <a href="#M000010">first</a>&nbsp;&nbsp;
104
- <a href="#M000011">length</a>&nbsp;&nbsp;
105
- <a href="#M000017">set</a>&nbsp;&nbsp;
106
- <a href="#M000012">size</a>&nbsp;&nbsp;
107
- <a href="#M000015">string</a>&nbsp;&nbsp;
108
- <a href="#M000013">to_a</a>&nbsp;&nbsp;
109
- <a href="#M000008">xpath_type</a>&nbsp;&nbsp;
110
- </div>
111
- </div>
112
-
113
- </div>
114
-
115
-
116
- <!-- if includes -->
117
- <div id="includes">
118
- <h3 class="section-bar">Included Modules</h3>
119
-
120
- <div id="includes-list">
121
- <span class="include-name">Enumerable</span>
122
- </div>
123
- </div>
124
-
125
- <div id="section">
126
-
127
-
128
-
129
-
130
-
131
- <div id="attribute-list">
132
- <h3 class="section-bar">Attributes</h3>
133
-
134
- <div class="name-list">
135
- <table>
136
- <tr class="top-aligned-row context-row">
137
- <td class="context-item-name">context</td>
138
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
139
- <td class="context-item-desc"></td>
140
- </tr>
141
- </table>
142
- </div>
143
- </div>
144
-
145
-
146
-
147
- <!-- if method_list -->
148
- <div id="methods">
149
- <h3 class="section-bar">Public Instance methods</h3>
150
-
151
- <div id="method-M000014" class="method-detail">
152
- <a name="M000014"></a>
153
-
154
- <div class="method-heading">
155
- <a href="#M000014" class="method-signature">
156
- <span class="method-name">xpath_object[i] &rarr; node<br />
157
- </span>
158
- </a>
159
- </div>
160
-
161
- <div class="method-description">
162
- <p>
163
- array index into <a href="Object.html#M000017">set</a> of nodes
164
- </p>
165
- <p><a class="source-toggle" href="#"
166
- onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
167
- <div class="method-source-code" id="M000014-source">
168
- <pre>
169
- /*
170
- * call-seq:
171
- * xpath_object[i] -&gt; node
172
- *
173
- * array index into set of nodes
174
- */
175
- VALUE
176
- ruby_xml_xpath_object_aref(VALUE self, VALUE aref) {
177
-
178
- </pre>
179
- </div>
180
- </div>
181
- </div>
182
-
183
- <div id="method-M000016" class="method-detail">
184
- <a name="M000016"></a>
185
-
186
- <div class="method-heading">
187
- <a href="#M000016" class="method-signature">
188
- <span class="method-name">nodes.debug &rarr; (true|false)<br />
189
- </span>
190
- </a>
191
- </div>
192
-
193
- <div class="method-description">
194
- <p>
195
- Dump libxml debugging information to stdout. Requires Libxml be compiled
196
- with debugging enabled.
197
- </p>
198
- <p><a class="source-toggle" href="#"
199
- onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
200
- <div class="method-source-code" id="M000016-source">
201
- <pre>
202
- /*
203
- * call-seq:
204
- * nodes.debug -&gt; (true|false)
205
- *
206
- * Dump libxml debugging information to stdout.
207
- * Requires Libxml be compiled with debugging enabled.
208
- */
209
- VALUE
210
- ruby_xml_xpath_object_debug(VALUE self) {
211
-
212
- </pre>
213
- </div>
214
- </div>
215
- </div>
216
-
217
- <div id="method-M000007" class="method-detail">
218
- <a name="M000007"></a>
219
-
220
- <div class="method-heading">
221
- <a href="#M000007" class="method-signature">
222
- <span class="method-name">xpath_object.each { |node| ... } &rarr; self<br />
223
- </span>
224
- </a>
225
- </div>
226
-
227
- <div class="method-description">
228
- <p>
229
- Call the supplied block for <a href="Object.html#M000007">each</a> node in
230
- this <a href="Object.html#M000017">set</a>.
231
- </p>
232
- <p><a class="source-toggle" href="#"
233
- onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
234
- <div class="method-source-code" id="M000007-source">
235
- <pre>
236
- /*
237
- * call-seq:
238
- * xpath_object.each { |node| ... } -&gt; self
239
- *
240
- * Call the supplied block for each node in this set.
241
- */
242
- VALUE
243
- ruby_xml_xpath_object_each(VALUE self)
244
- {
245
- xmlXPathObjectPtr xpop;
246
- int i;
247
-
248
- if ( ruby_xml_xpath_object_empty_q(self) == Qtrue )
249
- return Qnil;
250
-
251
- Data_Get_Struct(self,xmlXPathObject,xpop);
252
-
253
- for (i = 0; i &lt; xpop-&gt;nodesetval-&gt;nodeNr; i++) {
254
- rb_yield(ruby_xml_xpath_object_tabref(xpop,i));
255
- }
256
- return(self);
257
- }
258
- </pre>
259
- </div>
260
- </div>
261
- </div>
262
-
263
- <div id="method-M000009" class="method-detail">
264
- <a name="M000009"></a>
265
-
266
- <div class="method-heading">
267
- <a href="#M000009" class="method-signature">
268
- <span class="method-name">xpath_object.empty? &rarr; (true|false)<br />
269
- </span>
270
- </a>
271
- </div>
272
-
273
- <div class="method-description">
274
- <p>
275
- Determine whether this nodeset is empty (contains no nodes).
276
- </p>
277
- <p><a class="source-toggle" href="#"
278
- onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
279
- <div class="method-source-code" id="M000009-source">
280
- <pre>
281
- /*
282
- * call-seq:
283
- * xpath_object.empty? -&gt; (true|false)
284
- *
285
- * Determine whether this nodeset is empty (contains no nodes).
286
- */
287
- VALUE
288
- ruby_xml_xpath_object_empty_q(VALUE self) {
289
-
290
- </pre>
291
- </div>
292
- </div>
293
- </div>
294
-
295
- <div id="method-M000010" class="method-detail">
296
- <a name="M000010"></a>
297
-
298
- <div class="method-heading">
299
- <a href="#M000010" class="method-signature">
300
- <span class="method-name">xpath_object.first &rarr; node<br />
301
- </span>
302
- </a>
303
- </div>
304
-
305
- <div class="method-description">
306
- <p>
307
- Returns the <a href="Object.html#M000010">first</a> node in this node <a
308
- href="Object.html#M000017">set</a>, or nil if none exist.
309
- </p>
310
- <p><a class="source-toggle" href="#"
311
- onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
312
- <div class="method-source-code" id="M000010-source">
313
- <pre>
314
- /*
315
- * call-seq:
316
- * xpath_object.first -&gt; node
317
- *
318
- * Returns the first node in this node set, or nil if none exist.
319
- */
320
- VALUE
321
- ruby_xml_xpath_object_first(VALUE self) {
322
-
323
- </pre>
324
- </div>
325
- </div>
326
- </div>
327
-
328
- <div id="method-M000011" class="method-detail">
329
- <a name="M000011"></a>
330
-
331
- <div class="method-heading">
332
- <a href="#M000011" class="method-signature">
333
- <span class="method-name">xpath_object.length &rarr; num<br />
334
- </span>
335
- </a>
336
- </div>
337
-
338
- <div class="method-description">
339
- <p>
340
- Obtain the <a href="Object.html#M000011">length</a> of the nodesetval node
341
- list.
342
- </p>
343
- <p><a class="source-toggle" href="#"
344
- onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
345
- <div class="method-source-code" id="M000011-source">
346
- <pre>
347
- /*
348
- * call-seq:
349
- * xpath_object.length -&gt; num
350
- *
351
- * Obtain the length of the nodesetval node list.
352
- */
353
- VALUE
354
- ruby_xml_xpath_object_length(VALUE self) {
355
-
356
- </pre>
357
- </div>
358
- </div>
359
- </div>
360
-
361
- <div id="method-M000017" class="method-detail">
362
- <a name="M000017"></a>
363
-
364
- <div class="method-heading">
365
- <a href="#M000017" class="method-signature">
366
- <span class="method-name">xpath_object.set &rarr; Node::Set<br />
367
- </span>
368
- </a>
369
- </div>
370
-
371
- <div class="method-description">
372
- <p>
373
- Obtain the previous type object which is really just a proxy back to this
374
- object. Unless the type is not a NODESET, in which case it is nil.
375
- </p>
376
- <p><a class="source-toggle" href="#"
377
- onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
378
- <div class="method-source-code" id="M000017-source">
379
- <pre>
380
- /*
381
- * call-seq:
382
- * xpath_object.set -&gt; Node::Set
383
- *
384
- * Obtain the previous type object which is really
385
- * just a proxy back to this object. Unless the
386
- * type is not a NODESET, in which case it is nil.
387
- */
388
- VALUE
389
- ruby_xml_xpath_object_set(VALUE self)
390
- {
391
- xmlXPathObjectPtr xpop;
392
- VALUE r;
393
-
394
- Data_Get_Struct(self,xmlXPathObject,xpop);
395
- r=Qnil;
396
-
397
- if (xpop-&gt;type == XPATH_NODESET)
398
- r=ruby_xml_node_set_new2(self);
399
-
400
- return r;
401
- }
402
- </pre>
403
- </div>
404
- </div>
405
- </div>
406
-
407
- <div id="method-M000012" class="method-detail">
408
- <a name="M000012"></a>
409
-
410
- <div class="method-heading">
411
- <a href="#M000012" class="method-signature">
412
- <span class="method-name">xpath_object.length &rarr; num<br />
413
- </span>
414
- </a>
415
- </div>
416
-
417
- <div class="method-description">
418
- <p>
419
- Obtain the <a href="Object.html#M000011">length</a> of the nodesetval node
420
- list.
421
- </p>
422
- <p><a class="source-toggle" href="#"
423
- onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
424
- <div class="method-source-code" id="M000012-source">
425
- <pre>
426
- /*
427
- * call-seq:
428
- * xpath_object.length -&gt; num
429
- *
430
- * Obtain the length of the nodesetval node list.
431
- */
432
- VALUE
433
- ruby_xml_xpath_object_length(VALUE self) {
434
-
435
- </pre>
436
- </div>
437
- </div>
438
- </div>
439
-
440
- <div id="method-M000015" class="method-detail">
441
- <a name="M000015"></a>
442
-
443
- <div class="method-heading">
444
- <a href="#M000015" class="method-signature">
445
- <span class="method-name">xpath_object.string &rarr; String<br />
446
- </span>
447
- </a>
448
- </div>
449
-
450
- <div class="method-description">
451
- <p>
452
- Returns the original <a href="../XPath.html">XPath</a> expression as a <a
453
- href="Object.html#M000015">string</a>.
454
- </p>
455
- <p><a class="source-toggle" href="#"
456
- onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
457
- <div class="method-source-code" id="M000015-source">
458
- <pre>
459
- /*
460
- * call-seq:
461
- * xpath_object.string -&gt; String
462
- *
463
- * Returns the original XPath expression as a string.
464
- */
465
- VALUE
466
- ruby_xml_xpath_object_string(VALUE self)
467
- {
468
- xmlXPathObjectPtr xpop;
469
-
470
- Data_Get_Struct(self,xmlXPathObject,xpop);
471
-
472
- if (xpop-&gt;stringval == NULL)
473
- return Qnil;
474
-
475
- return rb_str_new2((const char*) xpop-&gt;stringval);
476
- }
477
- </pre>
478
- </div>
479
- </div>
480
- </div>
481
-
482
- <div id="method-M000013" class="method-detail">
483
- <a name="M000013"></a>
484
-
485
- <div class="method-heading">
486
- <a href="#M000013" class="method-signature">
487
- <span class="method-name">xpath_object.to_a &rarr; [node, ..., node]<br />
488
- </span>
489
- </a>
490
- </div>
491
-
492
- <div class="method-description">
493
- <p>
494
- Obtain an array of the nodes in this <a href="Object.html#M000017">set</a>.
495
- </p>
496
- <p><a class="source-toggle" href="#"
497
- onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
498
- <div class="method-source-code" id="M000013-source">
499
- <pre>
500
- /*
501
- * call-seq:
502
- * xpath_object.to_a -&gt; [node, ..., node]
503
- *
504
- * Obtain an array of the nodes in this set.
505
- */
506
- VALUE
507
- ruby_xml_xpath_object_to_a(VALUE self)
508
- {
509
- VALUE set_ary, nodeobj;
510
- xmlXPathObjectPtr xpop;
511
- int i;
512
-
513
- Data_Get_Struct(self,xmlXPathObject,xpop);
514
-
515
- set_ary = rb_ary_new();
516
- if (!((xpop-&gt;nodesetval == NULL) || (xpop-&gt;nodesetval-&gt;nodeNr == 0))) {
517
- for (i = 0; i &lt; xpop-&gt;nodesetval-&gt;nodeNr; i++) {
518
- nodeobj = ruby_xml_xpath_object_tabref(xpop, i);
519
- rb_ary_push(set_ary, nodeobj);
520
- }
521
- }
522
-
523
- return(set_ary);
524
- }
525
- </pre>
526
- </div>
527
- </div>
528
- </div>
529
-
530
- <div id="method-M000008" class="method-detail">
531
- <a name="M000008"></a>
532
-
533
- <div class="method-heading">
534
- <a href="#M000008" class="method-signature">
535
- <span class="method-name">xpath_object.xpath_type &rarr; int<br />
536
- </span>
537
- </a>
538
- </div>
539
-
540
- <div class="method-description">
541
- <p>
542
- Returns the <a href="../XPath.html">XPath</a> type of the result object.
543
- Possible values are defined as constants on the <a
544
- href="../XPath.html">XML::XPath</a> class and include:
545
- </p>
546
- <ul>
547
- <li>XML::XPath::UNDEFINED
548
-
549
- </li>
550
- <li>XML::XPath::NODESET
551
-
552
- </li>
553
- <li>XML::XPath::BOOLEAN
554
-
555
- </li>
556
- <li>XML::XPath::NUMBER
557
-
558
- </li>
559
- <li>XML::XPath::STRING
560
-
561
- </li>
562
- <li>XML::XPath::POINT
563
-
564
- </li>
565
- <li>XML::XPath::RANGE
566
-
567
- </li>
568
- <li>XML::XPath::LOCATIONSET
569
-
570
- </li>
571
- <li>XML::XPath::USERS
572
-
573
- </li>
574
- <li>XML::XPath::XSLT_TREE
575
-
576
- </li>
577
- </ul>
578
- <p><a class="source-toggle" href="#"
579
- onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
580
- <div class="method-source-code" id="M000008-source">
581
- <pre>
582
- /*
583
- * call-seq:
584
- * xpath_object.xpath_type -&gt; int
585
- *
586
- * Returns the XPath type of the result object.
587
- * Possible values are defined as constants
588
- * on the XML::XPath class and include:
589
- *
590
- * * XML::XPath::UNDEFINED
591
- * * XML::XPath::NODESET
592
- * * XML::XPath::BOOLEAN
593
- * * XML::XPath::NUMBER
594
- * * XML::XPath::STRING
595
- * * XML::XPath::POINT
596
- * * XML::XPath::RANGE
597
- * * XML::XPath::LOCATIONSET
598
- * * XML::XPath::USERS
599
- * * XML::XPath::XSLT_TREE
600
- */
601
- VALUE
602
- ruby_xml_xpath_object_get_type(VALUE self)
603
- {
604
- xmlXPathObjectPtr xpop;
605
-
606
- Data_Get_Struct(self,xmlXPathObject,xpop);
607
-
608
- return INT2FIX(xpop-&gt;type);
609
- }
610
- </pre>
611
- </div>
612
- </div>
613
- </div>
614
-
615
-
616
- </div>
617
-
618
-
619
- </div>
620
-
621
-
622
- <div id="validator-badges">
623
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
624
- </div>
625
-
626
- </body>
627
- </html>