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