libxml-ruby 0.6.0-x86-mswin32-60 → 0.7.0-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +42 -0
- data/README +123 -117
- data/doc/classes/XML.html +226 -0
- data/doc/classes/XML/Attr.html +969 -0
- data/doc/classes/XML/Attributes.html +487 -0
- data/doc/classes/XML/Document.html +1423 -0
- data/doc/classes/XML/Dtd.html +159 -0
- data/doc/classes/XML/Error.html +111 -0
- data/doc/classes/XML/HTMLParser.html +330 -0
- data/doc/classes/XML/InputCallbacks.html +154 -0
- data/doc/classes/XML/NS.html +366 -0
- data/doc/classes/XML/Node.html +3292 -0
- data/doc/classes/XML/Node/FailedModify.html +111 -0
- data/doc/classes/XML/Node/Set.html +435 -0
- data/doc/classes/XML/Node/SetNamespace.html +111 -0
- data/doc/classes/XML/Node/UnknownType.html +111 -0
- data/doc/classes/XML/Parser.html +2178 -0
- data/doc/classes/XML/Parser/Context.html +1233 -0
- data/doc/classes/XML/Parser/ParseError.html +111 -0
- data/doc/classes/XML/Reader.html +2173 -0
- data/doc/classes/XML/SaxParser.html +396 -0
- data/doc/classes/XML/SiblingEnum.html +142 -0
- data/doc/classes/XML/State.html +118 -0
- data/doc/classes/XML/Tree.html +224 -0
- data/doc/classes/XML/XInclude.html +117 -0
- data/doc/classes/XML/XInclude/Error.html +111 -0
- data/doc/classes/XML/XMLParserOptions.html +198 -0
- data/doc/classes/XML/XPath.html +269 -0
- data/doc/classes/XML/XPath/Context.html +193 -0
- data/doc/classes/XML/XPath/InvalidPath.html +111 -0
- data/doc/classes/XML/XPath/Object.html +439 -0
- data/doc/classes/XML/XPointer.html +164 -0
- data/doc/classes/XML/XPointer/Context.html +117 -0
- data/doc/classes/XML/XPointer/Context/InvalidPath.html +111 -0
- data/doc/classes/XML/XPointer/InvalidExpression.html +111 -0
- data/doc/classes/singleton.html +114 -0
- data/doc/created.rid +1 -0
- data/doc/files/CHANGES.html +375 -0
- data/doc/files/LICENSE.html +133 -0
- data/doc/files/README.html +279 -0
- data/doc/files/VERSION.html +107 -0
- data/doc/files/ext/libxml/cbg_c.html +101 -0
- data/doc/files/ext/libxml/libxml_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_attr_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_attributes_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_document_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_dtd_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_html_parser_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_input_cbg_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_node_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_node_set_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_ns_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_parser_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_parser_context_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_reader_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_sax_parser_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_schema_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_state_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_tree_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_xinclude_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_xpath_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_xpath_context_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_xpath_object_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_xpointer_c.html +101 -0
- data/doc/files/ext/libxml/ruby_xml_xpointer_context_c.html +101 -0
- data/doc/files/lib/libxml_rb.html +115 -0
- data/doc/files/lib/xml/libxml_rb.html +114 -0
- data/doc/fr_class_index.html +60 -0
- data/doc/fr_file_index.html +56 -0
- data/doc/fr_method_index.html +373 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/ext/libxml/cbg.c +76 -76
- data/ext/libxml/extconf.rb +308 -308
- data/ext/libxml/libxml.c +58 -62
- data/ext/libxml/ruby_libxml.h +1 -0
- data/ext/libxml/ruby_xml_attr.c +201 -113
- data/ext/libxml/ruby_xml_attr.h +6 -9
- data/ext/libxml/ruby_xml_attributes.c +268 -0
- data/ext/libxml/ruby_xml_attributes.h +17 -0
- data/ext/libxml/ruby_xml_document.c +80 -66
- data/ext/libxml/ruby_xml_dtd.c +2 -2
- data/ext/libxml/ruby_xml_dtd.h +17 -17
- data/ext/libxml/ruby_xml_html_parser.c +18 -19
- data/ext/libxml/ruby_xml_html_parser.h +29 -29
- data/ext/libxml/ruby_xml_input_cbg.c +6 -0
- data/ext/libxml/ruby_xml_input_cbg.h +20 -20
- data/ext/libxml/ruby_xml_node.c +438 -536
- data/ext/libxml/ruby_xml_node.h +17 -27
- data/ext/libxml/ruby_xml_node_set.c +10 -9
- data/ext/libxml/ruby_xml_node_set.h +20 -20
- data/ext/libxml/ruby_xml_ns.c +60 -69
- data/ext/libxml/ruby_xml_ns.h +12 -21
- data/ext/libxml/ruby_xml_parser.c +54 -53
- data/ext/libxml/ruby_xml_parser.h +31 -31
- data/ext/libxml/ruby_xml_parser_context.c +37 -91
- data/ext/libxml/ruby_xml_parser_context.h +20 -22
- data/ext/libxml/ruby_xml_reader.h +14 -14
- data/ext/libxml/ruby_xml_sax_parser.c +55 -55
- data/ext/libxml/ruby_xml_sax_parser.h +56 -56
- data/ext/libxml/ruby_xml_schema.c +44 -51
- data/ext/libxml/ruby_xml_schema.h +16 -16
- data/ext/libxml/ruby_xml_state.c +35 -96
- data/ext/libxml/ruby_xml_state.h +2 -3
- data/ext/libxml/ruby_xml_tree.h +12 -12
- data/ext/libxml/ruby_xml_xinclude.h +13 -13
- data/ext/libxml/ruby_xml_xpath.c +57 -18
- data/ext/libxml/ruby_xml_xpath.h +23 -23
- data/ext/libxml/ruby_xml_xpath_context.c +11 -7
- data/ext/libxml/ruby_xml_xpath_context.h +20 -20
- data/ext/libxml/ruby_xml_xpath_object.c +9 -16
- data/ext/libxml/ruby_xml_xpath_object.h +4 -10
- data/ext/libxml/ruby_xml_xpointer.c +11 -11
- data/ext/libxml/ruby_xml_xpointer.h +27 -27
- data/ext/libxml/ruby_xml_xpointer_context.h +18 -18
- data/ext/libxml/version.h +2 -2
- data/lib/libxml.rb +134 -125
- data/lib/libxml_ruby.so +0 -0
- data/mingw/libiconv-2.dll +0 -0
- data/mingw/libxml2-2.dll +0 -0
- data/mingw/libxml_ruby.so +0 -0
- data/test/ets_copy_bug.rb +1 -1
- data/test/ets_copy_bug2.rb +16 -27
- data/test/ets_doc_to_s.rb +1 -1
- data/test/ets_gpx.rb +1 -1
- data/test/ets_node_gc.rb +1 -1
- data/test/ets_tsr.rb +1 -1
- data/test/tc_well_formed.rb +1 -1
- data/test/tc_xml_attributes.rb +106 -0
- data/test/tc_xml_document.rb +10 -10
- data/test/tc_xml_document_write3.rb +1 -1
- data/test/tc_xml_dtd.rb +49 -0
- data/test/tc_xml_html_parser.rb +3 -3
- data/test/tc_xml_node.rb +69 -33
- data/test/tc_xml_node_attr.rb +170 -0
- data/test/{tc_xml_node8.rb → tc_xml_node_cdata.rb} +2 -2
- data/test/{tc_xml_node9.rb → tc_xml_node_comment.rb} +3 -3
- data/test/tc_xml_node_edit.rb +91 -0
- data/test/tc_xml_parser.rb +97 -50
- data/test/tc_xml_parser_context.rb +61 -23
- data/test/tc_xml_schema.rb +39 -0
- data/test/tc_xml_xinclude.rb +5 -6
- data/test/tc_xml_xpath.rb +51 -27
- data/test/test_suite.rb +27 -0
- data/vc/{libxml.sln → libxml_ruby.sln} +5 -5
- data/vc/{libxml.vcproj → libxml_ruby.vcproj} +9 -1
- metadata +106 -54
- data/mingw/mingw.rake +0 -36
- data/test/dtd-test.rb +0 -24
- data/test/merge_bug.rb +0 -55
- data/test/schema-test.rb +0 -74
- data/test/tc_xml_node2.rb +0 -25
- data/test/tc_xml_node3.rb +0 -27
- data/test/tc_xml_node4.rb +0 -86
- data/test/tc_xml_node5.rb +0 -52
- data/test/tc_xml_node6.rb +0 -27
- data/test/tc_xml_node7.rb +0 -35
- data/test/tc_xml_parser2.rb +0 -16
- data/test/tc_xml_parser3.rb +0 -23
- data/test/tc_xml_parser4.rb +0 -33
- data/test/tc_xml_parser5.rb +0 -27
- data/test/tc_xml_parser6.rb +0 -23
- data/test/tc_xml_parser7.rb +0 -28
- data/test/tc_xml_parser8.rb +0 -32
- data/test/tc_xml_parser9.rb +0 -11
- data/test/tc_xml_xpath2.rb +0 -14
- data/work/vc/debug/libxml.exp +0 -0
- data/work/vc/debug/libxml.ilk +0 -0
- data/work/vc/debug/libxml.lib +0 -0
- data/work/vc/debug/libxml.pdb +0 -0
- data/work/vc/debug/libxml.so +0 -0
@@ -0,0 +1,487 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: XML::Attributes</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">XML::Attributes</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
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
Provides access to an elements attributes (<a
|
84
|
+
href="Attr.html">XML::Attr</a>).
|
85
|
+
</p>
|
86
|
+
<p>
|
87
|
+
Basic Usage:
|
88
|
+
</p>
|
89
|
+
<pre>
|
90
|
+
require 'libxml'
|
91
|
+
|
92
|
+
doc = XML::Document.new(<some_file>)
|
93
|
+
attributes = doc.root.attributes
|
94
|
+
|
95
|
+
attributes.each do |attribute|
|
96
|
+
..
|
97
|
+
end
|
98
|
+
|
99
|
+
attributes['foo'] = 'bar'
|
100
|
+
attribute = attributes.get_attribute['foo']
|
101
|
+
attribute.value == 'foo'
|
102
|
+
</pre>
|
103
|
+
<p>
|
104
|
+
To access a namespaced attribute:
|
105
|
+
</p>
|
106
|
+
<pre>
|
107
|
+
XLINK_URI = 'http://www.w3.org/1999/xlink'
|
108
|
+
|
109
|
+
attribute = attributes.get_attribute_ns(XLINK_URI, 'title')
|
110
|
+
attribute.value = 'My title'
|
111
|
+
</pre>
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
</div>
|
117
|
+
|
118
|
+
<div id="method-list">
|
119
|
+
<h3 class="section-bar">Methods</h3>
|
120
|
+
|
121
|
+
<div class="name-list">
|
122
|
+
<a href="#M000207">[]</a>
|
123
|
+
<a href="#M000208">[]=</a>
|
124
|
+
<a href="#M000209">each</a>
|
125
|
+
<a href="#M000211">first</a>
|
126
|
+
<a href="#M000205">get_attribute</a>
|
127
|
+
<a href="#M000206">get_attribute_ns</a>
|
128
|
+
<a href="#M000210">length</a>
|
129
|
+
<a href="#M000204">node</a>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
|
133
|
+
</div>
|
134
|
+
|
135
|
+
|
136
|
+
<!-- if includes -->
|
137
|
+
|
138
|
+
<div id="section">
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
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-M000207" class="method-detail">
|
152
|
+
<a name="M000207"></a>
|
153
|
+
|
154
|
+
<div class="method-heading">
|
155
|
+
<a href="#M000207" class="method-signature">
|
156
|
+
<span class="method-name">attributes["name"] → String<br />
|
157
|
+
</span>
|
158
|
+
</a>
|
159
|
+
</div>
|
160
|
+
|
161
|
+
<div class="method-description">
|
162
|
+
<p>
|
163
|
+
Fetches an attribute value. If you want to access the underlying Attribute
|
164
|
+
itself use <a href="Attributes.html#M000205">get_attribute</a>.
|
165
|
+
</p>
|
166
|
+
<p>
|
167
|
+
name: The name of the attribute, not including any namespaces.
|
168
|
+
</p>
|
169
|
+
<pre>
|
170
|
+
doc.root.attributes['att'] -> 'some value'
|
171
|
+
</pre>
|
172
|
+
<p><a class="source-toggle" href="#"
|
173
|
+
onclick="toggleCode('M000207-source');return false;">[Source]</a></p>
|
174
|
+
<div class="method-source-code" id="M000207-source">
|
175
|
+
<pre>
|
176
|
+
/*
|
177
|
+
* call-seq:
|
178
|
+
* attributes["name"] -> String
|
179
|
+
*
|
180
|
+
* Fetches an attribute value. If you want to access the underlying
|
181
|
+
* Attribute itself use get_attribute.
|
182
|
+
*
|
183
|
+
* name: The name of the attribute, not including any namespaces.
|
184
|
+
*
|
185
|
+
* doc.root.attributes['att'] -> 'some value'
|
186
|
+
*/
|
187
|
+
VALUE
|
188
|
+
ruby_xml_attributes_attribute_get(VALUE self, VALUE name) {
|
189
|
+
|
190
|
+
</pre>
|
191
|
+
</div>
|
192
|
+
</div>
|
193
|
+
</div>
|
194
|
+
|
195
|
+
<div id="method-M000208" class="method-detail">
|
196
|
+
<a name="M000208"></a>
|
197
|
+
|
198
|
+
<div class="method-heading">
|
199
|
+
<a href="#M000208" class="method-signature">
|
200
|
+
<span class="method-name">attributes["name"] = "value"<br />
|
201
|
+
</span>
|
202
|
+
</a>
|
203
|
+
</div>
|
204
|
+
|
205
|
+
<div class="method-description">
|
206
|
+
<p>
|
207
|
+
Sets an attribute value. If you want to get the Attribute itself, use <a
|
208
|
+
href="Attributes.html#M000205">get_attribute</a>.
|
209
|
+
</p>
|
210
|
+
<p>
|
211
|
+
name: The name of the attribute, not including any namespaces. value: The
|
212
|
+
new value of the namespace.
|
213
|
+
</p>
|
214
|
+
<pre>
|
215
|
+
doc.root.attributes['att'] = 'some value'
|
216
|
+
</pre>
|
217
|
+
<p><a class="source-toggle" href="#"
|
218
|
+
onclick="toggleCode('M000208-source');return false;">[Source]</a></p>
|
219
|
+
<div class="method-source-code" id="M000208-source">
|
220
|
+
<pre>
|
221
|
+
/*
|
222
|
+
* call-seq:
|
223
|
+
* attributes["name"] = "value"
|
224
|
+
*
|
225
|
+
* Sets an attribute value. If you want to get the Attribute itself,
|
226
|
+
* use get_attribute.
|
227
|
+
*
|
228
|
+
* name: The name of the attribute, not including any namespaces.
|
229
|
+
* value: The new value of the namespace.
|
230
|
+
*
|
231
|
+
* doc.root.attributes['att'] = 'some value'
|
232
|
+
*/
|
233
|
+
VALUE
|
234
|
+
ruby_xml_attributes_attribute_set(VALUE self, VALUE name, VALUE value) {
|
235
|
+
|
236
|
+
</pre>
|
237
|
+
</div>
|
238
|
+
</div>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
<div id="method-M000209" class="method-detail">
|
242
|
+
<a name="M000209"></a>
|
243
|
+
|
244
|
+
<div class="method-heading">
|
245
|
+
<a href="#M000209" class="method-signature">
|
246
|
+
<span class="method-name">attributes.each {block} → XML::Attr<br />
|
247
|
+
</span>
|
248
|
+
</a>
|
249
|
+
</div>
|
250
|
+
|
251
|
+
<div class="method-description">
|
252
|
+
<p>
|
253
|
+
Iterates over each attribute.
|
254
|
+
</p>
|
255
|
+
<pre>
|
256
|
+
doc.root.attributes.each {|attribute| puts attribute.name}
|
257
|
+
</pre>
|
258
|
+
<p><a class="source-toggle" href="#"
|
259
|
+
onclick="toggleCode('M000209-source');return false;">[Source]</a></p>
|
260
|
+
<div class="method-source-code" id="M000209-source">
|
261
|
+
<pre>
|
262
|
+
/*
|
263
|
+
* call-seq:
|
264
|
+
* attributes.each {block} -> XML::Attr
|
265
|
+
*
|
266
|
+
* Iterates over each attribute.
|
267
|
+
*
|
268
|
+
* doc.root.attributes.each {|attribute| puts attribute.name}
|
269
|
+
*/
|
270
|
+
VALUE
|
271
|
+
ruby_xml_attributes_each(VALUE self) {
|
272
|
+
|
273
|
+
</pre>
|
274
|
+
</div>
|
275
|
+
</div>
|
276
|
+
</div>
|
277
|
+
|
278
|
+
<div id="method-M000211" class="method-detail">
|
279
|
+
<a name="M000211"></a>
|
280
|
+
|
281
|
+
<div class="method-heading">
|
282
|
+
<a href="#M000211" class="method-signature">
|
283
|
+
<span class="method-name">attributes.first → XML::Attr<br />
|
284
|
+
</span>
|
285
|
+
</a>
|
286
|
+
</div>
|
287
|
+
|
288
|
+
<div class="method-description">
|
289
|
+
<p>
|
290
|
+
Returns the first attribute.
|
291
|
+
</p>
|
292
|
+
<pre>
|
293
|
+
doc.root.attributes.first
|
294
|
+
</pre>
|
295
|
+
<p><a class="source-toggle" href="#"
|
296
|
+
onclick="toggleCode('M000211-source');return false;">[Source]</a></p>
|
297
|
+
<div class="method-source-code" id="M000211-source">
|
298
|
+
<pre>
|
299
|
+
/*
|
300
|
+
* call-seq:
|
301
|
+
* attributes.first -> XML::Attr
|
302
|
+
*
|
303
|
+
* Returns the first attribute.
|
304
|
+
*
|
305
|
+
* doc.root.attributes.first
|
306
|
+
*/
|
307
|
+
VALUE
|
308
|
+
ruby_xml_attributes_first(VALUE self) {
|
309
|
+
|
310
|
+
</pre>
|
311
|
+
</div>
|
312
|
+
</div>
|
313
|
+
</div>
|
314
|
+
|
315
|
+
<div id="method-M000205" class="method-detail">
|
316
|
+
<a name="M000205"></a>
|
317
|
+
|
318
|
+
<div class="method-heading">
|
319
|
+
<a href="#M000205" class="method-signature">
|
320
|
+
<span class="method-name">attributes.get_attribute("name") → XML::Attr<br />
|
321
|
+
</span>
|
322
|
+
</a>
|
323
|
+
</div>
|
324
|
+
|
325
|
+
<div class="method-description">
|
326
|
+
<p>
|
327
|
+
Returns the specified attribute.
|
328
|
+
</p>
|
329
|
+
<p>
|
330
|
+
name: The name of the attribute, not including a namespace.
|
331
|
+
</p>
|
332
|
+
<pre>
|
333
|
+
doc.root.attributes.get_attribute("foo")
|
334
|
+
</pre>
|
335
|
+
<p><a class="source-toggle" href="#"
|
336
|
+
onclick="toggleCode('M000205-source');return false;">[Source]</a></p>
|
337
|
+
<div class="method-source-code" id="M000205-source">
|
338
|
+
<pre>
|
339
|
+
/*
|
340
|
+
* call-seq:
|
341
|
+
* attributes.get_attribute("name") -> XML::Attr
|
342
|
+
*
|
343
|
+
* Returns the specified attribute.
|
344
|
+
*
|
345
|
+
* name: The name of the attribute, not including a namespace.
|
346
|
+
*
|
347
|
+
* doc.root.attributes.get_attribute("foo")
|
348
|
+
*/
|
349
|
+
VALUE
|
350
|
+
ruby_xml_attributes_get_attribute(VALUE self, VALUE name) {
|
351
|
+
|
352
|
+
</pre>
|
353
|
+
</div>
|
354
|
+
</div>
|
355
|
+
</div>
|
356
|
+
|
357
|
+
<div id="method-M000206" class="method-detail">
|
358
|
+
<a name="M000206"></a>
|
359
|
+
|
360
|
+
<div class="method-heading">
|
361
|
+
<a href="#M000206" class="method-signature">
|
362
|
+
<span class="method-name">attributes.get_attribute_ns("namespace", "name") → XML::Attr<br />
|
363
|
+
</span>
|
364
|
+
</a>
|
365
|
+
</div>
|
366
|
+
|
367
|
+
<div class="method-description">
|
368
|
+
<p>
|
369
|
+
Returns the specified attribute.
|
370
|
+
</p>
|
371
|
+
<p>
|
372
|
+
namespace: The URI of the attribute’s namespace. name: The name of
|
373
|
+
the attribute, not including a namespace.
|
374
|
+
</p>
|
375
|
+
<pre>
|
376
|
+
doc.root.attributes.get_attribute_ns('http://www.w3.org/1999/xlink', 'href')
|
377
|
+
</pre>
|
378
|
+
<p><a class="source-toggle" href="#"
|
379
|
+
onclick="toggleCode('M000206-source');return false;">[Source]</a></p>
|
380
|
+
<div class="method-source-code" id="M000206-source">
|
381
|
+
<pre>
|
382
|
+
/*
|
383
|
+
* call-seq:
|
384
|
+
* attributes.get_attribute_ns("namespace", "name") -> XML::Attr
|
385
|
+
*
|
386
|
+
* Returns the specified attribute.
|
387
|
+
*
|
388
|
+
* namespace: The URI of the attribute's namespace.
|
389
|
+
* name: The name of the attribute, not including a namespace.
|
390
|
+
*
|
391
|
+
* doc.root.attributes.get_attribute_ns('http://www.w3.org/1999/xlink', 'href')
|
392
|
+
*/
|
393
|
+
VALUE
|
394
|
+
ruby_xml_attributes_get_attribute_ns(VALUE self, VALUE namespace, VALUE name) {
|
395
|
+
|
396
|
+
</pre>
|
397
|
+
</div>
|
398
|
+
</div>
|
399
|
+
</div>
|
400
|
+
|
401
|
+
<div id="method-M000210" class="method-detail">
|
402
|
+
<a name="M000210"></a>
|
403
|
+
|
404
|
+
<div class="method-heading">
|
405
|
+
<a href="#M000210" class="method-signature">
|
406
|
+
<span class="method-name">attributes.length → Integer<br />
|
407
|
+
</span>
|
408
|
+
</a>
|
409
|
+
</div>
|
410
|
+
|
411
|
+
<div class="method-description">
|
412
|
+
<p>
|
413
|
+
Returns the number of attributes.
|
414
|
+
</p>
|
415
|
+
<pre>
|
416
|
+
doc.root.attributes.length
|
417
|
+
</pre>
|
418
|
+
<p><a class="source-toggle" href="#"
|
419
|
+
onclick="toggleCode('M000210-source');return false;">[Source]</a></p>
|
420
|
+
<div class="method-source-code" id="M000210-source">
|
421
|
+
<pre>
|
422
|
+
/*
|
423
|
+
* call-seq:
|
424
|
+
* attributes.length -> Integer
|
425
|
+
*
|
426
|
+
* Returns the number of attributes.
|
427
|
+
*
|
428
|
+
* doc.root.attributes.length
|
429
|
+
*/
|
430
|
+
VALUE
|
431
|
+
ruby_xml_attributes_length(VALUE self) {
|
432
|
+
|
433
|
+
</pre>
|
434
|
+
</div>
|
435
|
+
</div>
|
436
|
+
</div>
|
437
|
+
|
438
|
+
<div id="method-M000204" class="method-detail">
|
439
|
+
<a name="M000204"></a>
|
440
|
+
|
441
|
+
<div class="method-heading">
|
442
|
+
<a href="#M000204" class="method-signature">
|
443
|
+
<span class="method-name">attributes.node → XML::Node<br />
|
444
|
+
</span>
|
445
|
+
</a>
|
446
|
+
</div>
|
447
|
+
|
448
|
+
<div class="method-description">
|
449
|
+
<p>
|
450
|
+
Return the node that owns this attributes list.
|
451
|
+
</p>
|
452
|
+
<pre>
|
453
|
+
doc.root.attributes.node == doc.root
|
454
|
+
</pre>
|
455
|
+
<p><a class="source-toggle" href="#"
|
456
|
+
onclick="toggleCode('M000204-source');return false;">[Source]</a></p>
|
457
|
+
<div class="method-source-code" id="M000204-source">
|
458
|
+
<pre>
|
459
|
+
/*
|
460
|
+
* call-seq:
|
461
|
+
* attributes.node -> XML::Node
|
462
|
+
*
|
463
|
+
* Return the node that owns this attributes list.
|
464
|
+
*
|
465
|
+
* doc.root.attributes.node == doc.root
|
466
|
+
*/
|
467
|
+
VALUE
|
468
|
+
ruby_xml_attributes_node_get(VALUE self) {
|
469
|
+
|
470
|
+
</pre>
|
471
|
+
</div>
|
472
|
+
</div>
|
473
|
+
</div>
|
474
|
+
|
475
|
+
|
476
|
+
</div>
|
477
|
+
|
478
|
+
|
479
|
+
</div>
|
480
|
+
|
481
|
+
|
482
|
+
<div id="validator-badges">
|
483
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
484
|
+
</div>
|
485
|
+
|
486
|
+
</body>
|
487
|
+
</html>
|