libxml-ruby 0.6.0-x86-mswin32-60 → 0.7.0-x86-mswin32-60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,193 @@
|
|
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::XPath::Context</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::XPath::Context</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
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="method-list">
|
88
|
+
<h3 class="section-bar">Methods</h3>
|
89
|
+
|
90
|
+
<div class="name-list">
|
91
|
+
<a href="#M000240">doc</a>
|
92
|
+
<a href="#M000239">register_namespace</a>
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
|
96
|
+
</div>
|
97
|
+
|
98
|
+
|
99
|
+
<!-- if includes -->
|
100
|
+
|
101
|
+
<div id="section">
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<!-- if method_list -->
|
111
|
+
<div id="methods">
|
112
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
113
|
+
|
114
|
+
<div id="method-M000240" class="method-detail">
|
115
|
+
<a name="M000240"></a>
|
116
|
+
|
117
|
+
<div class="method-heading">
|
118
|
+
<a href="#M000240" class="method-signature">
|
119
|
+
<span class="method-name">context.doc → document<br />
|
120
|
+
</span>
|
121
|
+
</a>
|
122
|
+
</div>
|
123
|
+
|
124
|
+
<div class="method-description">
|
125
|
+
<p>
|
126
|
+
Obtain the <a href="../Document.html">XML::Document</a> associated with
|
127
|
+
this <a href="../XPath.html">XPath</a>.
|
128
|
+
</p>
|
129
|
+
<p><a class="source-toggle" href="#"
|
130
|
+
onclick="toggleCode('M000240-source');return false;">[Source]</a></p>
|
131
|
+
<div class="method-source-code" id="M000240-source">
|
132
|
+
<pre>
|
133
|
+
/*
|
134
|
+
* call-seq:
|
135
|
+
* context.doc -> document
|
136
|
+
*
|
137
|
+
* Obtain the XML::Document associated with this XPath.
|
138
|
+
*/
|
139
|
+
VALUE
|
140
|
+
ruby_xml_xpath_context_doc_get(VALUE self) {
|
141
|
+
|
142
|
+
</pre>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
</div>
|
146
|
+
|
147
|
+
<div id="method-M000239" class="method-detail">
|
148
|
+
<a name="M000239"></a>
|
149
|
+
|
150
|
+
<div class="method-heading">
|
151
|
+
<a href="#M000239" class="method-signature">
|
152
|
+
<span class="method-name">context.register_namespace(prefix, uri) → (true|false)<br />
|
153
|
+
</span>
|
154
|
+
</a>
|
155
|
+
</div>
|
156
|
+
|
157
|
+
<div class="method-description">
|
158
|
+
<p>
|
159
|
+
Register the specified namespace URI with the specified prefix in this
|
160
|
+
context.
|
161
|
+
</p>
|
162
|
+
<p><a class="source-toggle" href="#"
|
163
|
+
onclick="toggleCode('M000239-source');return false;">[Source]</a></p>
|
164
|
+
<div class="method-source-code" id="M000239-source">
|
165
|
+
<pre>
|
166
|
+
/*
|
167
|
+
* call-seq:
|
168
|
+
* context.register_namespace(prefix, uri) -> (true|false)
|
169
|
+
*
|
170
|
+
* Register the specified namespace URI with the specified prefix
|
171
|
+
* in this context.
|
172
|
+
*/
|
173
|
+
VALUE
|
174
|
+
ruby_xml_xpath_context_register_namespace(VALUE self, VALUE prefix, VALUE uri) {
|
175
|
+
|
176
|
+
</pre>
|
177
|
+
</div>
|
178
|
+
</div>
|
179
|
+
</div>
|
180
|
+
|
181
|
+
|
182
|
+
</div>
|
183
|
+
|
184
|
+
|
185
|
+
</div>
|
186
|
+
|
187
|
+
|
188
|
+
<div id="validator-badges">
|
189
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
190
|
+
</div>
|
191
|
+
|
192
|
+
</body>
|
193
|
+
</html>
|
@@ -0,0 +1,111 @@
|
|
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::XPath::InvalidPath</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::XPath::InvalidPath</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
|
+
eXMLError
|
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
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
|
89
|
+
<!-- if includes -->
|
90
|
+
|
91
|
+
<div id="section">
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<!-- if method_list -->
|
101
|
+
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
|
106
|
+
<div id="validator-badges">
|
107
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
</body>
|
111
|
+
</html>
|
@@ -0,0 +1,439 @@
|
|
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::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">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
|
+
All <a href="../XPath.html">XPath</a> and <a
|
86
|
+
href="../XPointer.html">XPointer</a> evals result in this type. nodeset
|
87
|
+
should become entirely virtual and refer back to this class/data structure.
|
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="#M000247">[]</a>
|
100
|
+
<a href="#M000241">each</a>
|
101
|
+
<a href="#M000242">empty?</a>
|
102
|
+
<a href="#M000243">first</a>
|
103
|
+
<a href="#M000244">length</a>
|
104
|
+
<a href="#M000248">set</a>
|
105
|
+
<a href="#M000245">size</a>
|
106
|
+
<a href="#M000246">to_a</a>
|
107
|
+
</div>
|
108
|
+
</div>
|
109
|
+
|
110
|
+
</div>
|
111
|
+
|
112
|
+
|
113
|
+
<!-- if includes -->
|
114
|
+
|
115
|
+
<div id="section">
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
<!-- if method_list -->
|
125
|
+
<div id="methods">
|
126
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
127
|
+
|
128
|
+
<div id="method-M000247" class="method-detail">
|
129
|
+
<a name="M000247"></a>
|
130
|
+
|
131
|
+
<div class="method-heading">
|
132
|
+
<a href="#M000247" class="method-signature">
|
133
|
+
<span class="method-name">xpath_object[i] → node<br />
|
134
|
+
</span>
|
135
|
+
</a>
|
136
|
+
</div>
|
137
|
+
|
138
|
+
<div class="method-description">
|
139
|
+
<p>
|
140
|
+
array index into set of nodes
|
141
|
+
</p>
|
142
|
+
<p><a class="source-toggle" href="#"
|
143
|
+
onclick="toggleCode('M000247-source');return false;">[Source]</a></p>
|
144
|
+
<div class="method-source-code" id="M000247-source">
|
145
|
+
<pre>
|
146
|
+
/*
|
147
|
+
* call-seq:
|
148
|
+
* xpath_object[i] -> node
|
149
|
+
*
|
150
|
+
* array index into set of nodes
|
151
|
+
*/
|
152
|
+
VALUE
|
153
|
+
ruby_xml_xpath_object_aref(VALUE self, VALUE aref) {
|
154
|
+
|
155
|
+
</pre>
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
|
160
|
+
<div id="method-M000241" class="method-detail">
|
161
|
+
<a name="M000241"></a>
|
162
|
+
|
163
|
+
<div class="method-heading">
|
164
|
+
<a href="#M000241" class="method-signature">
|
165
|
+
<span class="method-name">xpath_object.each { |node| ... } → self<br />
|
166
|
+
</span>
|
167
|
+
</a>
|
168
|
+
</div>
|
169
|
+
|
170
|
+
<div class="method-description">
|
171
|
+
<p>
|
172
|
+
Call the supplied block for each node in this set.
|
173
|
+
</p>
|
174
|
+
<p><a class="source-toggle" href="#"
|
175
|
+
onclick="toggleCode('M000241-source');return false;">[Source]</a></p>
|
176
|
+
<div class="method-source-code" id="M000241-source">
|
177
|
+
<pre>
|
178
|
+
/*
|
179
|
+
* call-seq:
|
180
|
+
* xpath_object.each { |node| ... } -> self
|
181
|
+
*
|
182
|
+
* Call the supplied block for each node in this set.
|
183
|
+
*/
|
184
|
+
VALUE
|
185
|
+
ruby_xml_xpath_object_each(VALUE self)
|
186
|
+
{
|
187
|
+
xmlXPathObjectPtr xpop;
|
188
|
+
int i;
|
189
|
+
|
190
|
+
if ( ruby_xml_xpath_object_empty_q(self) == Qtrue )
|
191
|
+
return Qnil;
|
192
|
+
|
193
|
+
Data_Get_Struct(self,xmlXPathObject,xpop);
|
194
|
+
|
195
|
+
for (i = 0; i < xpop->nodesetval->nodeNr; i++) {
|
196
|
+
rb_yield(ruby_xml_xpath_object_tabref(xpop,i));
|
197
|
+
}
|
198
|
+
return(self);
|
199
|
+
}
|
200
|
+
</pre>
|
201
|
+
</div>
|
202
|
+
</div>
|
203
|
+
</div>
|
204
|
+
|
205
|
+
<div id="method-M000242" class="method-detail">
|
206
|
+
<a name="M000242"></a>
|
207
|
+
|
208
|
+
<div class="method-heading">
|
209
|
+
<a href="#M000242" class="method-signature">
|
210
|
+
<span class="method-name">xpath_object.empty? → (true|false)<br />
|
211
|
+
</span>
|
212
|
+
</a>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
<div class="method-description">
|
216
|
+
<p>
|
217
|
+
Determine whether this nodeset is empty (contains no nodes).
|
218
|
+
</p>
|
219
|
+
<p><a class="source-toggle" href="#"
|
220
|
+
onclick="toggleCode('M000242-source');return false;">[Source]</a></p>
|
221
|
+
<div class="method-source-code" id="M000242-source">
|
222
|
+
<pre>
|
223
|
+
/*
|
224
|
+
* call-seq:
|
225
|
+
* xpath_object.empty? -> (true|false)
|
226
|
+
*
|
227
|
+
* Determine whether this nodeset is empty (contains no nodes).
|
228
|
+
*/
|
229
|
+
VALUE
|
230
|
+
ruby_xml_xpath_object_empty_q(VALUE self) {
|
231
|
+
|
232
|
+
</pre>
|
233
|
+
</div>
|
234
|
+
</div>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
<div id="method-M000243" class="method-detail">
|
238
|
+
<a name="M000243"></a>
|
239
|
+
|
240
|
+
<div class="method-heading">
|
241
|
+
<a href="#M000243" class="method-signature">
|
242
|
+
<span class="method-name">xpath_object.first → node<br />
|
243
|
+
</span>
|
244
|
+
</a>
|
245
|
+
</div>
|
246
|
+
|
247
|
+
<div class="method-description">
|
248
|
+
<p>
|
249
|
+
Returns the first node in this node set, or nil if none exist.
|
250
|
+
</p>
|
251
|
+
<p><a class="source-toggle" href="#"
|
252
|
+
onclick="toggleCode('M000243-source');return false;">[Source]</a></p>
|
253
|
+
<div class="method-source-code" id="M000243-source">
|
254
|
+
<pre>
|
255
|
+
/*
|
256
|
+
* call-seq:
|
257
|
+
* xpath_object.first -> node
|
258
|
+
*
|
259
|
+
* Returns the first node in this node set, or nil if none exist.
|
260
|
+
*/
|
261
|
+
VALUE
|
262
|
+
ruby_xml_xpath_object_first(VALUE self) {
|
263
|
+
|
264
|
+
</pre>
|
265
|
+
</div>
|
266
|
+
</div>
|
267
|
+
</div>
|
268
|
+
|
269
|
+
<div id="method-M000244" class="method-detail">
|
270
|
+
<a name="M000244"></a>
|
271
|
+
|
272
|
+
<div class="method-heading">
|
273
|
+
<a href="#M000244" class="method-signature">
|
274
|
+
<span class="method-name">xpath_object.length → num<br />
|
275
|
+
</span>
|
276
|
+
</a>
|
277
|
+
</div>
|
278
|
+
|
279
|
+
<div class="method-description">
|
280
|
+
<p>
|
281
|
+
Obtain the length of the nodesetval node list.
|
282
|
+
</p>
|
283
|
+
<p><a class="source-toggle" href="#"
|
284
|
+
onclick="toggleCode('M000244-source');return false;">[Source]</a></p>
|
285
|
+
<div class="method-source-code" id="M000244-source">
|
286
|
+
<pre>
|
287
|
+
/*
|
288
|
+
* call-seq:
|
289
|
+
* xpath_object.length -> num
|
290
|
+
*
|
291
|
+
* Obtain the length of the nodesetval node list.
|
292
|
+
*/
|
293
|
+
VALUE
|
294
|
+
ruby_xml_xpath_object_length(VALUE self) {
|
295
|
+
|
296
|
+
</pre>
|
297
|
+
</div>
|
298
|
+
</div>
|
299
|
+
</div>
|
300
|
+
|
301
|
+
<div id="method-M000248" class="method-detail">
|
302
|
+
<a name="M000248"></a>
|
303
|
+
|
304
|
+
<div class="method-heading">
|
305
|
+
<a href="#M000248" class="method-signature">
|
306
|
+
<span class="method-name">xpath_object.set → Node::Set<br />
|
307
|
+
</span>
|
308
|
+
</a>
|
309
|
+
</div>
|
310
|
+
|
311
|
+
<div class="method-description">
|
312
|
+
<p>
|
313
|
+
Obtain the previous type object which is really just a proxy back to this
|
314
|
+
object. Unless the type is not a NODESET, in which case it is nil.
|
315
|
+
</p>
|
316
|
+
<p><a class="source-toggle" href="#"
|
317
|
+
onclick="toggleCode('M000248-source');return false;">[Source]</a></p>
|
318
|
+
<div class="method-source-code" id="M000248-source">
|
319
|
+
<pre>
|
320
|
+
/*
|
321
|
+
* call-seq:
|
322
|
+
* xpath_object.set -> Node::Set
|
323
|
+
*
|
324
|
+
* Obtain the previous type object which is really
|
325
|
+
* just a proxy back to this object. Unless the
|
326
|
+
* type is not a NODESET, in which case it is nil.
|
327
|
+
*/
|
328
|
+
VALUE
|
329
|
+
ruby_xml_xpath_object_set(VALUE self)
|
330
|
+
{
|
331
|
+
xmlXPathObjectPtr xpop;
|
332
|
+
VALUE r;
|
333
|
+
|
334
|
+
Data_Get_Struct(self,xmlXPathObject,xpop);
|
335
|
+
r=Qnil;
|
336
|
+
|
337
|
+
if (xpop->type == XPATH_NODESET)
|
338
|
+
r=ruby_xml_node_set_new2(self);
|
339
|
+
|
340
|
+
return r;
|
341
|
+
}
|
342
|
+
</pre>
|
343
|
+
</div>
|
344
|
+
</div>
|
345
|
+
</div>
|
346
|
+
|
347
|
+
<div id="method-M000245" class="method-detail">
|
348
|
+
<a name="M000245"></a>
|
349
|
+
|
350
|
+
<div class="method-heading">
|
351
|
+
<a href="#M000245" class="method-signature">
|
352
|
+
<span class="method-name">xpath_object.length → num<br />
|
353
|
+
</span>
|
354
|
+
</a>
|
355
|
+
</div>
|
356
|
+
|
357
|
+
<div class="method-description">
|
358
|
+
<p>
|
359
|
+
Obtain the length of the nodesetval node list.
|
360
|
+
</p>
|
361
|
+
<p><a class="source-toggle" href="#"
|
362
|
+
onclick="toggleCode('M000245-source');return false;">[Source]</a></p>
|
363
|
+
<div class="method-source-code" id="M000245-source">
|
364
|
+
<pre>
|
365
|
+
/*
|
366
|
+
* call-seq:
|
367
|
+
* xpath_object.length -> num
|
368
|
+
*
|
369
|
+
* Obtain the length of the nodesetval node list.
|
370
|
+
*/
|
371
|
+
VALUE
|
372
|
+
ruby_xml_xpath_object_length(VALUE self) {
|
373
|
+
|
374
|
+
</pre>
|
375
|
+
</div>
|
376
|
+
</div>
|
377
|
+
</div>
|
378
|
+
|
379
|
+
<div id="method-M000246" class="method-detail">
|
380
|
+
<a name="M000246"></a>
|
381
|
+
|
382
|
+
<div class="method-heading">
|
383
|
+
<a href="#M000246" class="method-signature">
|
384
|
+
<span class="method-name">xpath_object.to_a → [node, ..., node]<br />
|
385
|
+
</span>
|
386
|
+
</a>
|
387
|
+
</div>
|
388
|
+
|
389
|
+
<div class="method-description">
|
390
|
+
<p>
|
391
|
+
Obtain an array of the nodes in this set.
|
392
|
+
</p>
|
393
|
+
<p><a class="source-toggle" href="#"
|
394
|
+
onclick="toggleCode('M000246-source');return false;">[Source]</a></p>
|
395
|
+
<div class="method-source-code" id="M000246-source">
|
396
|
+
<pre>
|
397
|
+
/*
|
398
|
+
* call-seq:
|
399
|
+
* xpath_object.to_a -> [node, ..., node]
|
400
|
+
*
|
401
|
+
* Obtain an array of the nodes in this set.
|
402
|
+
*/
|
403
|
+
VALUE
|
404
|
+
ruby_xml_xpath_object_to_a(VALUE self)
|
405
|
+
{
|
406
|
+
VALUE set_ary, nodeobj;
|
407
|
+
xmlXPathObjectPtr xpop;
|
408
|
+
int i;
|
409
|
+
|
410
|
+
Data_Get_Struct(self,xmlXPathObject,xpop);
|
411
|
+
|
412
|
+
set_ary = rb_ary_new();
|
413
|
+
if (!((xpop->nodesetval == NULL) || (xpop->nodesetval->nodeNr == 0))) {
|
414
|
+
for (i = 0; i < xpop->nodesetval->nodeNr; i++) {
|
415
|
+
nodeobj = ruby_xml_xpath_object_tabref(xpop, i);
|
416
|
+
rb_ary_push(set_ary, nodeobj);
|
417
|
+
}
|
418
|
+
}
|
419
|
+
|
420
|
+
return(set_ary);
|
421
|
+
}
|
422
|
+
</pre>
|
423
|
+
</div>
|
424
|
+
</div>
|
425
|
+
</div>
|
426
|
+
|
427
|
+
|
428
|
+
</div>
|
429
|
+
|
430
|
+
|
431
|
+
</div>
|
432
|
+
|
433
|
+
|
434
|
+
<div id="validator-badges">
|
435
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
436
|
+
</div>
|
437
|
+
|
438
|
+
</body>
|
439
|
+
</html>
|