libxml-ruby 0.8.3-x86-mswin32-60 → 0.9.0-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- 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/{lib → ext/mingw}/libiconv-2.dll +0 -0
- data/ext/mingw/libxml2-2.dll +0 -0
- data/ext/mingw/libxml_ruby.dll.a +0 -0
- data/ext/mingw/libxml_ruby.so +0 -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 +32 -115
- 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/lib/libxml2-2.dll +0 -0
- data/lib/libxml_ruby.dll.a +0 -0
- data/lib/libxml_ruby.so +0 -0
- data/test/tc_node_set.rb +0 -24
- data/test/tc_node_set2.rb +0 -37
@@ -1,123 +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::Parser::ParseError</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::Parser::ParseError</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_parser_c.html">
|
59
|
-
ext/libxml/ruby_xml_parser.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
|
-
RuntimeError
|
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
|
-
<pre>
|
83
|
-
#define RUBY_XML_PARSER_ENABLED_INIT(func, method) \
|
84
|
-
</pre>
|
85
|
-
<p>
|
86
|
-
rb_define_singleton_method(cXMLParser, method, \
|
87
|
-
</p>
|
88
|
-
<pre>
|
89
|
-
ruby_xml_parser_enabled_##func##_q, 0);
|
90
|
-
</pre>
|
91
|
-
|
92
|
-
</div>
|
93
|
-
|
94
|
-
|
95
|
-
</div>
|
96
|
-
|
97
|
-
|
98
|
-
</div>
|
99
|
-
|
100
|
-
|
101
|
-
<!-- if includes -->
|
102
|
-
|
103
|
-
<div id="section">
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
<!-- if method_list -->
|
113
|
-
|
114
|
-
|
115
|
-
</div>
|
116
|
-
|
117
|
-
|
118
|
-
<div id="validator-badges">
|
119
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
120
|
-
</div>
|
121
|
-
|
122
|
-
</body>
|
123
|
-
</html>
|
@@ -1,2264 +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::Reader</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::Reader</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
|
-
Rdoc needs to know.
|
84
|
-
</p>
|
85
|
-
|
86
|
-
</div>
|
87
|
-
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
<div id="method-list">
|
92
|
-
<h3 class="section-bar">Methods</h3>
|
93
|
-
|
94
|
-
<div class="name-list">
|
95
|
-
<a href="#M000302">[]</a>
|
96
|
-
<a href="#M000289">attribute_count</a>
|
97
|
-
<a href="#M000293">base_uri</a>
|
98
|
-
<a href="#M000307">byte_consumed</a>
|
99
|
-
<a href="#M000270">close</a>
|
100
|
-
<a href="#M000308">column_number</a>
|
101
|
-
<a href="#M000310">default?</a>
|
102
|
-
<a href="#M000298">depth</a>
|
103
|
-
<a href="#M000311">empty_element?</a>
|
104
|
-
<a href="#M000292">encoding</a>
|
105
|
-
<a href="#M000306">expand</a>
|
106
|
-
<a href="#M000266">file</a>
|
107
|
-
<a href="#M000301">has_attributes?</a>
|
108
|
-
<a href="#M000303">has_value?</a>
|
109
|
-
<a href="#M000267">io</a>
|
110
|
-
<a href="#M000309">line_number</a>
|
111
|
-
<a href="#M000291">local_name</a>
|
112
|
-
<a href="#M000305">lookup_namespace</a>
|
113
|
-
<a href="#M000271">move_to_attribute</a>
|
114
|
-
<a href="#M000274">move_to_element</a>
|
115
|
-
<a href="#M000272">move_to_first_attribute</a>
|
116
|
-
<a href="#M000273">move_to_next_attribute</a>
|
117
|
-
<a href="#M000290">name</a>
|
118
|
-
<a href="#M000312">namespace_declaration?</a>
|
119
|
-
<a href="#M000294">namespace_uri</a>
|
120
|
-
<a href="#M000269">new</a>
|
121
|
-
<a href="#M000275">next</a>
|
122
|
-
<a href="#M000276">next_sibling</a>
|
123
|
-
<a href="#M000287">node_type</a>
|
124
|
-
<a href="#M000288">normalization</a>
|
125
|
-
<a href="#M000297">prefix</a>
|
126
|
-
<a href="#M000299">quote_char</a>
|
127
|
-
<a href="#M000277">read</a>
|
128
|
-
<a href="#M000278">read_attribute_value</a>
|
129
|
-
<a href="#M000279">read_inner_xml</a>
|
130
|
-
<a href="#M000280">read_outer_xml</a>
|
131
|
-
<a href="#M000281">read_state</a>
|
132
|
-
<a href="#M000282">read_string</a>
|
133
|
-
<a href="#M000285">relax_ng_validate</a>
|
134
|
-
<a href="#M000284">reset_error_handler</a>
|
135
|
-
<a href="#M000286">schema_validate</a>
|
136
|
-
<a href="#M000283">set_error_handler</a>
|
137
|
-
<a href="#M000300">standalone</a>
|
138
|
-
<a href="#M000313">valid?</a>
|
139
|
-
<a href="#M000304">value</a>
|
140
|
-
<a href="#M000268">walker</a>
|
141
|
-
<a href="#M000295">xml_lang</a>
|
142
|
-
<a href="#M000296">xml_version</a>
|
143
|
-
</div>
|
144
|
-
</div>
|
145
|
-
|
146
|
-
</div>
|
147
|
-
|
148
|
-
|
149
|
-
<!-- if includes -->
|
150
|
-
|
151
|
-
<div id="section">
|
152
|
-
|
153
|
-
|
154
|
-
<div id="constants-list">
|
155
|
-
<h3 class="section-bar">Constants</h3>
|
156
|
-
|
157
|
-
<div class="name-list">
|
158
|
-
<table summary="Constants">
|
159
|
-
<tr class="top-aligned-row context-row">
|
160
|
-
<td class="context-item-name">LOADDTD</td>
|
161
|
-
<td>=</td>
|
162
|
-
<td class="context-item-value">INT2FIX(XML_PARSER_LOADDTD)</td>
|
163
|
-
</tr>
|
164
|
-
<tr class="top-aligned-row context-row">
|
165
|
-
<td class="context-item-name">DEFAULTATTRS</td>
|
166
|
-
<td>=</td>
|
167
|
-
<td class="context-item-value">INT2FIX(XML_PARSER_DEFAULTATTRS)</td>
|
168
|
-
</tr>
|
169
|
-
<tr class="top-aligned-row context-row">
|
170
|
-
<td class="context-item-name">VALIDATE</td>
|
171
|
-
<td>=</td>
|
172
|
-
<td class="context-item-value">INT2FIX(XML_PARSER_VALIDATE)</td>
|
173
|
-
</tr>
|
174
|
-
<tr class="top-aligned-row context-row">
|
175
|
-
<td class="context-item-name">SUBST_ENTITIES</td>
|
176
|
-
<td>=</td>
|
177
|
-
<td class="context-item-value">INT2FIX(XML_PARSER_SUBST_ENTITIES)</td>
|
178
|
-
</tr>
|
179
|
-
<tr class="top-aligned-row context-row">
|
180
|
-
<td class="context-item-name">SEVERITY_VALIDITY_WARNING</td>
|
181
|
-
<td>=</td>
|
182
|
-
<td class="context-item-value">INT2FIX(XML_PARSER_SEVERITY_VALIDITY_WARNING)</td>
|
183
|
-
</tr>
|
184
|
-
<tr class="top-aligned-row context-row">
|
185
|
-
<td class="context-item-name">SEVERITY_VALIDITY_ERROR</td>
|
186
|
-
<td>=</td>
|
187
|
-
<td class="context-item-value">INT2FIX(XML_PARSER_SEVERITY_VALIDITY_ERROR)</td>
|
188
|
-
</tr>
|
189
|
-
<tr class="top-aligned-row context-row">
|
190
|
-
<td class="context-item-name">SEVERITY_WARNING</td>
|
191
|
-
<td>=</td>
|
192
|
-
<td class="context-item-value">INT2FIX(XML_PARSER_SEVERITY_WARNING)</td>
|
193
|
-
</tr>
|
194
|
-
<tr class="top-aligned-row context-row">
|
195
|
-
<td class="context-item-name">SEVERITY_ERROR</td>
|
196
|
-
<td>=</td>
|
197
|
-
<td class="context-item-value">INT2FIX(XML_PARSER_SEVERITY_ERROR)</td>
|
198
|
-
</tr>
|
199
|
-
<tr class="top-aligned-row context-row">
|
200
|
-
<td class="context-item-name">TYPE_NONE</td>
|
201
|
-
<td>=</td>
|
202
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_NONE)</td>
|
203
|
-
</tr>
|
204
|
-
<tr class="top-aligned-row context-row">
|
205
|
-
<td class="context-item-name">TYPE_ELEMENT</td>
|
206
|
-
<td>=</td>
|
207
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_ELEMENT)</td>
|
208
|
-
</tr>
|
209
|
-
<tr class="top-aligned-row context-row">
|
210
|
-
<td class="context-item-name">TYPE_ATTRIBUTE</td>
|
211
|
-
<td>=</td>
|
212
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_ATTRIBUTE)</td>
|
213
|
-
</tr>
|
214
|
-
<tr class="top-aligned-row context-row">
|
215
|
-
<td class="context-item-name">TYPE_TEXT</td>
|
216
|
-
<td>=</td>
|
217
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_TEXT)</td>
|
218
|
-
</tr>
|
219
|
-
<tr class="top-aligned-row context-row">
|
220
|
-
<td class="context-item-name">TYPE_CDATA</td>
|
221
|
-
<td>=</td>
|
222
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_CDATA)</td>
|
223
|
-
</tr>
|
224
|
-
<tr class="top-aligned-row context-row">
|
225
|
-
<td class="context-item-name">TYPE_ENTITY_REFERENCE</td>
|
226
|
-
<td>=</td>
|
227
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_ENTITY_REFERENCE)</td>
|
228
|
-
</tr>
|
229
|
-
<tr class="top-aligned-row context-row">
|
230
|
-
<td class="context-item-name">TYPE_ENTITY</td>
|
231
|
-
<td>=</td>
|
232
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_ENTITY)</td>
|
233
|
-
</tr>
|
234
|
-
<tr class="top-aligned-row context-row">
|
235
|
-
<td class="context-item-name">TYPE_PROCESSING_INSTRUCTION</td>
|
236
|
-
<td>=</td>
|
237
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_PROCESSING_INSTRUCTION)</td>
|
238
|
-
</tr>
|
239
|
-
<tr class="top-aligned-row context-row">
|
240
|
-
<td class="context-item-name">TYPE_COMMENT</td>
|
241
|
-
<td>=</td>
|
242
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_COMMENT)</td>
|
243
|
-
</tr>
|
244
|
-
<tr class="top-aligned-row context-row">
|
245
|
-
<td class="context-item-name">TYPE_DOCUMENT</td>
|
246
|
-
<td>=</td>
|
247
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_DOCUMENT)</td>
|
248
|
-
</tr>
|
249
|
-
<tr class="top-aligned-row context-row">
|
250
|
-
<td class="context-item-name">TYPE_DOCUMENT_TYPE</td>
|
251
|
-
<td>=</td>
|
252
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_DOCUMENT_TYPE)</td>
|
253
|
-
</tr>
|
254
|
-
<tr class="top-aligned-row context-row">
|
255
|
-
<td class="context-item-name">TYPE_DOCUMENT_FRAGMENT</td>
|
256
|
-
<td>=</td>
|
257
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_DOCUMENT_FRAGMENT)</td>
|
258
|
-
</tr>
|
259
|
-
<tr class="top-aligned-row context-row">
|
260
|
-
<td class="context-item-name">TYPE_NOTATION</td>
|
261
|
-
<td>=</td>
|
262
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_NOTATION)</td>
|
263
|
-
</tr>
|
264
|
-
<tr class="top-aligned-row context-row">
|
265
|
-
<td class="context-item-name">TYPE_WHITESPACE</td>
|
266
|
-
<td>=</td>
|
267
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_WHITESPACE)</td>
|
268
|
-
</tr>
|
269
|
-
<tr class="top-aligned-row context-row">
|
270
|
-
<td class="context-item-name">TYPE_SIGNIFICANT_WHITESPACE</td>
|
271
|
-
<td>=</td>
|
272
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_SIGNIFICANT_WHITESPACE)</td>
|
273
|
-
</tr>
|
274
|
-
<tr class="top-aligned-row context-row">
|
275
|
-
<td class="context-item-name">TYPE_END_ELEMENT</td>
|
276
|
-
<td>=</td>
|
277
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_END_ELEMENT)</td>
|
278
|
-
</tr>
|
279
|
-
<tr class="top-aligned-row context-row">
|
280
|
-
<td class="context-item-name">TYPE_END_ENTITY</td>
|
281
|
-
<td>=</td>
|
282
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_END_ENTITY)</td>
|
283
|
-
</tr>
|
284
|
-
<tr class="top-aligned-row context-row">
|
285
|
-
<td class="context-item-name">TYPE_XML_DECLARATION</td>
|
286
|
-
<td>=</td>
|
287
|
-
<td class="context-item-value">INT2FIX(XML_READER_TYPE_XML_DECLARATION)</td>
|
288
|
-
</tr>
|
289
|
-
<tr class="top-aligned-row context-row">
|
290
|
-
<td class="context-item-name">MODE_INITIAL</td>
|
291
|
-
<td>=</td>
|
292
|
-
<td class="context-item-value">INT2FIX(XML_TEXTREADER_MODE_INITIAL)</td>
|
293
|
-
</tr>
|
294
|
-
<tr class="top-aligned-row context-row">
|
295
|
-
<td class="context-item-name">MODE_INTERACTIVE</td>
|
296
|
-
<td>=</td>
|
297
|
-
<td class="context-item-value">INT2FIX(XML_TEXTREADER_MODE_INTERACTIVE)</td>
|
298
|
-
</tr>
|
299
|
-
<tr class="top-aligned-row context-row">
|
300
|
-
<td class="context-item-name">MODE_ERROR</td>
|
301
|
-
<td>=</td>
|
302
|
-
<td class="context-item-value">INT2FIX(XML_TEXTREADER_MODE_ERROR)</td>
|
303
|
-
</tr>
|
304
|
-
<tr class="top-aligned-row context-row">
|
305
|
-
<td class="context-item-name">MODE_EOF</td>
|
306
|
-
<td>=</td>
|
307
|
-
<td class="context-item-value">INT2FIX(XML_TEXTREADER_MODE_EOF)</td>
|
308
|
-
</tr>
|
309
|
-
<tr class="top-aligned-row context-row">
|
310
|
-
<td class="context-item-name">MODE_CLOSED</td>
|
311
|
-
<td>=</td>
|
312
|
-
<td class="context-item-value">INT2FIX(XML_TEXTREADER_MODE_CLOSED)</td>
|
313
|
-
</tr>
|
314
|
-
<tr class="top-aligned-row context-row">
|
315
|
-
<td class="context-item-name">MODE_READING</td>
|
316
|
-
<td>=</td>
|
317
|
-
<td class="context-item-value">INT2FIX(XML_TEXTREADER_MODE_READING)</td>
|
318
|
-
</tr>
|
319
|
-
</table>
|
320
|
-
</div>
|
321
|
-
</div>
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
<!-- if method_list -->
|
329
|
-
<div id="methods">
|
330
|
-
<h3 class="section-bar">Public Class methods</h3>
|
331
|
-
|
332
|
-
<div id="method-M000266" class="method-detail">
|
333
|
-
<a name="M000266"></a>
|
334
|
-
|
335
|
-
<div class="method-heading">
|
336
|
-
<a href="#M000266" class="method-signature">
|
337
|
-
<span class="method-name">XML::Reader.file(path, encoding=nil, options=0) → reader<br />
|
338
|
-
</span>
|
339
|
-
</a>
|
340
|
-
</div>
|
341
|
-
|
342
|
-
<div class="method-description">
|
343
|
-
<p>
|
344
|
-
Parse an <a href="../XML.html">XML</a> <a
|
345
|
-
href="Reader.html#M000266">file</a> from the filesystem or the network. The
|
346
|
-
parsing flags options are a combination of xmlParserOption.
|
347
|
-
</p>
|
348
|
-
<p><a class="source-toggle" href="#"
|
349
|
-
onclick="toggleCode('M000266-source');return false;">[Source]</a></p>
|
350
|
-
<div class="method-source-code" id="M000266-source">
|
351
|
-
<pre>
|
352
|
-
/*
|
353
|
-
* call-seq:
|
354
|
-
* XML::Reader.file(path, encoding=nil, options=0) -> reader
|
355
|
-
*
|
356
|
-
* Parse an XML file from the filesystem or the network. The parsing flags
|
357
|
-
* options are a combination of xmlParserOption.
|
358
|
-
*/
|
359
|
-
static VALUE
|
360
|
-
ruby_xml_reader_new_file(int argc, VALUE *argv, VALUE self)
|
361
|
-
{
|
362
|
-
xmlTextReaderPtr reader;
|
363
|
-
VALUE path, encoding, options;
|
364
|
-
|
365
|
-
rb_scan_args(argc, argv, "12", &path, &encoding, &options);
|
366
|
-
|
367
|
-
reader = xmlReaderForFile(RVAL2CSTR(path),
|
368
|
-
NIL_P(encoding) ? NULL : RVAL2CSTR(encoding),
|
369
|
-
NIL_P(options) ? 0 : FIX2INT(options));
|
370
|
-
if (reader == NULL)
|
371
|
-
rb_raise(rb_eRuntimeError,
|
372
|
-
"cannot create text reader for given XML file at path '%s'",
|
373
|
-
RVAL2CSTR(path));
|
374
|
-
|
375
|
-
return ruby_xml_reader_new(self, reader);
|
376
|
-
}
|
377
|
-
</pre>
|
378
|
-
</div>
|
379
|
-
</div>
|
380
|
-
</div>
|
381
|
-
|
382
|
-
<div id="method-M000267" class="method-detail">
|
383
|
-
<a name="M000267"></a>
|
384
|
-
|
385
|
-
<div class="method-heading">
|
386
|
-
<a href="#M000267" class="method-signature">
|
387
|
-
<span class="method-name">XML::Reader.io(io, url=nil, encoding=nil, options=0) → reader<br />
|
388
|
-
</span>
|
389
|
-
</a>
|
390
|
-
</div>
|
391
|
-
|
392
|
-
<div class="method-description">
|
393
|
-
<p>
|
394
|
-
Parse an <a href="../XML.html">XML</a> <a
|
395
|
-
href="Reader.html#M000266">file</a> from a <a
|
396
|
-
href="Reader.html#M000266">file</a> handle. The parsing flags options are a
|
397
|
-
combination of xmlParserOption.
|
398
|
-
</p>
|
399
|
-
<p><a class="source-toggle" href="#"
|
400
|
-
onclick="toggleCode('M000267-source');return false;">[Source]</a></p>
|
401
|
-
<div class="method-source-code" id="M000267-source">
|
402
|
-
<pre>
|
403
|
-
/*
|
404
|
-
* call-seq:
|
405
|
-
* XML::Reader.io(io, url=nil, encoding=nil, options=0) -> reader
|
406
|
-
*
|
407
|
-
* Parse an XML file from a file handle. The parsing flags options are
|
408
|
-
* a combination of xmlParserOption.
|
409
|
-
*/
|
410
|
-
static VALUE
|
411
|
-
ruby_xml_reader_new_io(int argc, VALUE *argv, VALUE self)
|
412
|
-
{
|
413
|
-
xmlTextReaderPtr reader;
|
414
|
-
VALUE io, url, encoding, options;
|
415
|
-
OpenFile *fptr;
|
416
|
-
FILE *f;
|
417
|
-
|
418
|
-
#ifdef _WIN32
|
419
|
-
rb_raise(rb_eRuntimeError, "Reading an io stream is not supported on Windows");
|
420
|
-
#endif
|
421
|
-
|
422
|
-
rb_scan_args(argc, argv, "13", &io, &url, &encoding, &options);
|
423
|
-
|
424
|
-
if (!rb_obj_is_kind_of(io, rb_cIO))
|
425
|
-
rb_raise(rb_eTypeError, "need an IO object");
|
426
|
-
|
427
|
-
GetOpenFile(io, fptr);
|
428
|
-
rb_io_check_readable(fptr);
|
429
|
-
f = GetWriteFile(fptr);
|
430
|
-
|
431
|
-
reader = xmlReaderForIO((xmlInputReadCallback) ctxtRead, NULL, f,
|
432
|
-
NIL_P(url) ? NULL : RVAL2CSTR(url),
|
433
|
-
NIL_P(encoding) ? NULL : RVAL2CSTR(encoding),
|
434
|
-
NIL_P(options) ? 0 : FIX2INT(options));
|
435
|
-
if (reader == NULL)
|
436
|
-
rb_raise(rb_eRuntimeError, "cannot create text reader for given stream");
|
437
|
-
|
438
|
-
return ruby_xml_reader_new(self, reader);
|
439
|
-
}
|
440
|
-
</pre>
|
441
|
-
</div>
|
442
|
-
</div>
|
443
|
-
</div>
|
444
|
-
|
445
|
-
<div id="method-M000269" class="method-detail">
|
446
|
-
<a name="M000269"></a>
|
447
|
-
|
448
|
-
<div class="method-heading">
|
449
|
-
<a href="#M000269" class="method-signature">
|
450
|
-
<span class="method-name">XML::Reader.new(data, url=nil, encoding=nil, options=0) → reader<br />
|
451
|
-
XML::Reader.string(data, url=nil, encoding=nil, options=0) → reader<br />
|
452
|
-
</span>
|
453
|
-
</a>
|
454
|
-
</div>
|
455
|
-
|
456
|
-
<div class="method-description">
|
457
|
-
<p>
|
458
|
-
Create an <a href="../XML.html">XML</a> text reader for an <a
|
459
|
-
href="../XML.html">XML</a> in-memory document. The parsing flags options
|
460
|
-
are a combination of xmlParserOption.
|
461
|
-
</p>
|
462
|
-
<p><a class="source-toggle" href="#"
|
463
|
-
onclick="toggleCode('M000269-source');return false;">[Source]</a></p>
|
464
|
-
<div class="method-source-code" id="M000269-source">
|
465
|
-
<pre>
|
466
|
-
/*
|
467
|
-
* call-seq:
|
468
|
-
* XML::Reader.new(data, url=nil, encoding=nil, options=0) -> reader
|
469
|
-
* XML::Reader.string(data, url=nil, encoding=nil, options=0) -> reader
|
470
|
-
*
|
471
|
-
* Create an XML text reader for an XML in-memory document. The parsing flags
|
472
|
-
* options are a combination of xmlParserOption.
|
473
|
-
*/
|
474
|
-
static VALUE
|
475
|
-
ruby_xml_reader_new_data(int argc, VALUE *argv, VALUE self)
|
476
|
-
{
|
477
|
-
xmlTextReaderPtr reader;
|
478
|
-
VALUE data, url, encoding, options;
|
479
|
-
char *c_data;
|
480
|
-
|
481
|
-
rb_scan_args(argc, argv, "13", &data, &url, &encoding, &options);
|
482
|
-
|
483
|
-
c_data = RVAL2CSTR(data);
|
484
|
-
reader = xmlReaderForMemory(c_data,
|
485
|
-
strlen(c_data),
|
486
|
-
NIL_P(url) ? NULL : RVAL2CSTR(url),
|
487
|
-
NIL_P(encoding) ? NULL : RVAL2CSTR(encoding),
|
488
|
-
NIL_P(options) ? 0 : FIX2INT(options));
|
489
|
-
if (reader == NULL)
|
490
|
-
rb_raise(rb_eRuntimeError, "cannot create text reader for given data");
|
491
|
-
|
492
|
-
return ruby_xml_reader_new(self, reader);
|
493
|
-
}
|
494
|
-
</pre>
|
495
|
-
</div>
|
496
|
-
</div>
|
497
|
-
</div>
|
498
|
-
|
499
|
-
<div id="method-M000268" class="method-detail">
|
500
|
-
<a name="M000268"></a>
|
501
|
-
|
502
|
-
<div class="method-heading">
|
503
|
-
<a href="#M000268" class="method-signature">
|
504
|
-
<span class="method-name">XML::Reader.walker(doc) → reader<br />
|
505
|
-
XML::Reader.document(doc) → reader<br />
|
506
|
-
</span>
|
507
|
-
</a>
|
508
|
-
</div>
|
509
|
-
|
510
|
-
<div class="method-description">
|
511
|
-
<p>
|
512
|
-
Create an <a href="../XML.html">XML</a> text reader for a preparsed
|
513
|
-
document.
|
514
|
-
</p>
|
515
|
-
<p><a class="source-toggle" href="#"
|
516
|
-
onclick="toggleCode('M000268-source');return false;">[Source]</a></p>
|
517
|
-
<div class="method-source-code" id="M000268-source">
|
518
|
-
<pre>
|
519
|
-
/*
|
520
|
-
* call-seq:
|
521
|
-
* XML::Reader.walker(doc) -> reader
|
522
|
-
* XML::Reader.document(doc) -> reader
|
523
|
-
*
|
524
|
-
* Create an XML text reader for a preparsed document.
|
525
|
-
*/
|
526
|
-
VALUE
|
527
|
-
ruby_xml_reader_new_walker(VALUE self, VALUE doc)
|
528
|
-
{
|
529
|
-
ruby_xml_document_t *rxd;
|
530
|
-
xmlTextReaderPtr reader;
|
531
|
-
|
532
|
-
Data_Get_Struct(doc, ruby_xml_document_t, rxd);
|
533
|
-
|
534
|
-
reader = xmlReaderWalker(rxd->doc);
|
535
|
-
if (reader == NULL)
|
536
|
-
rb_raise(rb_eRuntimeError, "cannot create text reader for given document");
|
537
|
-
|
538
|
-
return ruby_xml_reader_new(self, reader);
|
539
|
-
}
|
540
|
-
</pre>
|
541
|
-
</div>
|
542
|
-
</div>
|
543
|
-
</div>
|
544
|
-
|
545
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
546
|
-
|
547
|
-
<div id="method-M000302" class="method-detail">
|
548
|
-
<a name="M000302"></a>
|
549
|
-
|
550
|
-
<div class="method-heading">
|
551
|
-
<a href="#M000302" class="method-signature">
|
552
|
-
<span class="method-name">reader[key] → value<br />
|
553
|
-
</span>
|
554
|
-
</a>
|
555
|
-
</div>
|
556
|
-
|
557
|
-
<div class="method-description">
|
558
|
-
<p>
|
559
|
-
Provide the <a href="Reader.html#M000304">value</a> of the attribute with
|
560
|
-
the specified index (if <tt>key</tt> is an integer) or with the specified
|
561
|
-
<a href="Reader.html#M000290">name</a> (if <tt>key</tt> is a string)
|
562
|
-
relative to the containing element, as a string.
|
563
|
-
</p>
|
564
|
-
<p><a class="source-toggle" href="#"
|
565
|
-
onclick="toggleCode('M000302-source');return false;">[Source]</a></p>
|
566
|
-
<div class="method-source-code" id="M000302-source">
|
567
|
-
<pre>
|
568
|
-
/*
|
569
|
-
* call-seq:
|
570
|
-
* reader[key] -> value
|
571
|
-
*
|
572
|
-
* Provide the value of the attribute with the specified index (if +key+ is an
|
573
|
-
* integer) or with the specified name (if +key+ is a string) relative to the
|
574
|
-
* containing element, as a string.
|
575
|
-
*/
|
576
|
-
static VALUE
|
577
|
-
ruby_xml_reader_attribute(VALUE self, VALUE key)
|
578
|
-
{
|
579
|
-
xmlTextReaderPtr reader;
|
580
|
-
xmlChar *attr;
|
581
|
-
|
582
|
-
reader = ruby_xml_text_reader_get(self);
|
583
|
-
|
584
|
-
if (TYPE(key) == T_FIXNUM) {
|
585
|
-
attr = xmlTextReaderGetAttributeNo(reader, FIX2INT(key));
|
586
|
-
}
|
587
|
-
else {
|
588
|
-
attr = xmlTextReaderGetAttribute(reader, (const xmlChar *)RVAL2CSTR(key));
|
589
|
-
}
|
590
|
-
return CSTR2RVAL2(attr);
|
591
|
-
}
|
592
|
-
</pre>
|
593
|
-
</div>
|
594
|
-
</div>
|
595
|
-
</div>
|
596
|
-
|
597
|
-
<div id="method-M000289" class="method-detail">
|
598
|
-
<a name="M000289"></a>
|
599
|
-
|
600
|
-
<div class="method-heading">
|
601
|
-
<a href="#M000289" class="method-signature">
|
602
|
-
<span class="method-name">reader.attribute_count → count<br />
|
603
|
-
</span>
|
604
|
-
</a>
|
605
|
-
</div>
|
606
|
-
|
607
|
-
<div class="method-description">
|
608
|
-
<p>
|
609
|
-
Provide the number of attributes of the current node.
|
610
|
-
</p>
|
611
|
-
<p><a class="source-toggle" href="#"
|
612
|
-
onclick="toggleCode('M000289-source');return false;">[Source]</a></p>
|
613
|
-
<div class="method-source-code" id="M000289-source">
|
614
|
-
<pre>
|
615
|
-
/*
|
616
|
-
* call-seq:
|
617
|
-
* reader.attribute_count -> count
|
618
|
-
*
|
619
|
-
* Provide the number of attributes of the current node.
|
620
|
-
*/
|
621
|
-
static VALUE
|
622
|
-
ruby_xml_reader_attr_count(VALUE self)
|
623
|
-
{
|
624
|
-
return INT2FIX(xmlTextReaderAttributeCount(ruby_xml_text_reader_get(self)));
|
625
|
-
}
|
626
|
-
</pre>
|
627
|
-
</div>
|
628
|
-
</div>
|
629
|
-
</div>
|
630
|
-
|
631
|
-
<div id="method-M000293" class="method-detail">
|
632
|
-
<a name="M000293"></a>
|
633
|
-
|
634
|
-
<div class="method-heading">
|
635
|
-
<a href="#M000293" class="method-signature">
|
636
|
-
<span class="method-name">reader.base_uri → URI<br />
|
637
|
-
</span>
|
638
|
-
</a>
|
639
|
-
</div>
|
640
|
-
|
641
|
-
<div class="method-description">
|
642
|
-
<p>
|
643
|
-
Determine the base URI of the node.
|
644
|
-
</p>
|
645
|
-
<p><a class="source-toggle" href="#"
|
646
|
-
onclick="toggleCode('M000293-source');return false;">[Source]</a></p>
|
647
|
-
<div class="method-source-code" id="M000293-source">
|
648
|
-
<pre>
|
649
|
-
/*
|
650
|
-
* call-seq:
|
651
|
-
* reader.base_uri -> URI
|
652
|
-
*
|
653
|
-
* Determine the base URI of the node.
|
654
|
-
*/
|
655
|
-
static VALUE
|
656
|
-
ruby_xml_reader_base_uri(VALUE self)
|
657
|
-
{
|
658
|
-
return CSTR2RVAL(xmlTextReaderConstBaseUri(ruby_xml_text_reader_get(self)));
|
659
|
-
}
|
660
|
-
</pre>
|
661
|
-
</div>
|
662
|
-
</div>
|
663
|
-
</div>
|
664
|
-
|
665
|
-
<div id="method-M000307" class="method-detail">
|
666
|
-
<a name="M000307"></a>
|
667
|
-
|
668
|
-
<div class="method-heading">
|
669
|
-
<a href="#M000307" class="method-signature">
|
670
|
-
<span class="method-name">reader.byte_consumed → value<br />
|
671
|
-
</span>
|
672
|
-
</a>
|
673
|
-
</div>
|
674
|
-
|
675
|
-
<div class="method-description">
|
676
|
-
<p>
|
677
|
-
This method provides the current index of the parser used by the reader,
|
678
|
-
relative to the start of the current entity.
|
679
|
-
</p>
|
680
|
-
<p><a class="source-toggle" href="#"
|
681
|
-
onclick="toggleCode('M000307-source');return false;">[Source]</a></p>
|
682
|
-
<div class="method-source-code" id="M000307-source">
|
683
|
-
<pre>
|
684
|
-
/*
|
685
|
-
* call-seq:
|
686
|
-
* reader.byte_consumed -> value
|
687
|
-
*
|
688
|
-
* This method provides the current index of the parser used by the reader,
|
689
|
-
* relative to the start of the current entity.
|
690
|
-
*/
|
691
|
-
static VALUE
|
692
|
-
ruby_xml_reader_byte_consumed(VALUE self)
|
693
|
-
{
|
694
|
-
return INT2NUM(xmlTextReaderByteConsumed(ruby_xml_text_reader_get(self)));
|
695
|
-
}
|
696
|
-
</pre>
|
697
|
-
</div>
|
698
|
-
</div>
|
699
|
-
</div>
|
700
|
-
|
701
|
-
<div id="method-M000270" class="method-detail">
|
702
|
-
<a name="M000270"></a>
|
703
|
-
|
704
|
-
<div class="method-heading">
|
705
|
-
<a href="#M000270" class="method-signature">
|
706
|
-
<span class="method-name">parser.close → code<br />
|
707
|
-
</span>
|
708
|
-
</a>
|
709
|
-
</div>
|
710
|
-
|
711
|
-
<div class="method-description">
|
712
|
-
<p>
|
713
|
-
This method releases any resources allocated by the current instance
|
714
|
-
changes the state to Closed and <a href="Reader.html#M000270">close</a> any
|
715
|
-
underlying input.
|
716
|
-
</p>
|
717
|
-
<p><a class="source-toggle" href="#"
|
718
|
-
onclick="toggleCode('M000270-source');return false;">[Source]</a></p>
|
719
|
-
<div class="method-source-code" id="M000270-source">
|
720
|
-
<pre>
|
721
|
-
/*
|
722
|
-
* call-seq:
|
723
|
-
* parser.close -> code
|
724
|
-
*
|
725
|
-
* This method releases any resources allocated by the current instance
|
726
|
-
* changes the state to Closed and close any underlying input.
|
727
|
-
*/
|
728
|
-
static VALUE
|
729
|
-
ruby_xml_reader_close(VALUE self)
|
730
|
-
{
|
731
|
-
return INT2FIX(xmlTextReaderClose(ruby_xml_text_reader_get(self)));
|
732
|
-
}
|
733
|
-
</pre>
|
734
|
-
</div>
|
735
|
-
</div>
|
736
|
-
</div>
|
737
|
-
|
738
|
-
<div id="method-M000308" class="method-detail">
|
739
|
-
<a name="M000308"></a>
|
740
|
-
|
741
|
-
<div class="method-heading">
|
742
|
-
<a href="#M000308" class="method-signature">
|
743
|
-
<span class="method-name">reader.column_number → number<br />
|
744
|
-
</span>
|
745
|
-
</a>
|
746
|
-
</div>
|
747
|
-
|
748
|
-
<div class="method-description">
|
749
|
-
<p>
|
750
|
-
Provide the column number of the current parsing point.
|
751
|
-
</p>
|
752
|
-
<p><a class="source-toggle" href="#"
|
753
|
-
onclick="toggleCode('M000308-source');return false;">[Source]</a></p>
|
754
|
-
<div class="method-source-code" id="M000308-source">
|
755
|
-
<pre>
|
756
|
-
/*
|
757
|
-
* call-seq:
|
758
|
-
* reader.column_number -> number
|
759
|
-
*
|
760
|
-
* Provide the column number of the current parsing point.
|
761
|
-
*/
|
762
|
-
static VALUE
|
763
|
-
ruby_xml_reader_column_number(VALUE self)
|
764
|
-
{
|
765
|
-
return INT2NUM(xmlTextReaderGetParserColumnNumber(ruby_xml_text_reader_get(self)));
|
766
|
-
}
|
767
|
-
</pre>
|
768
|
-
</div>
|
769
|
-
</div>
|
770
|
-
</div>
|
771
|
-
|
772
|
-
<div id="method-M000310" class="method-detail">
|
773
|
-
<a name="M000310"></a>
|
774
|
-
|
775
|
-
<div class="method-heading">
|
776
|
-
<a href="#M000310" class="method-signature">
|
777
|
-
<span class="method-name">reader.default? → bool<br />
|
778
|
-
</span>
|
779
|
-
</a>
|
780
|
-
</div>
|
781
|
-
|
782
|
-
<div class="method-description">
|
783
|
-
<p>
|
784
|
-
Return whether an Attribute node was generated from the default <a
|
785
|
-
href="Reader.html#M000304">value</a> defined in the DTD or schema.
|
786
|
-
</p>
|
787
|
-
<p><a class="source-toggle" href="#"
|
788
|
-
onclick="toggleCode('M000310-source');return false;">[Source]</a></p>
|
789
|
-
<div class="method-source-code" id="M000310-source">
|
790
|
-
<pre>
|
791
|
-
/*
|
792
|
-
* call-seq:
|
793
|
-
* reader.default? -> bool
|
794
|
-
*
|
795
|
-
* Return whether an Attribute node was generated from the default value
|
796
|
-
* defined in the DTD or schema.
|
797
|
-
*/
|
798
|
-
static VALUE
|
799
|
-
ruby_xml_reader_default(VALUE self)
|
800
|
-
{
|
801
|
-
return xmlTextReaderIsDefault(ruby_xml_text_reader_get(self)) ? Qtrue : Qfalse;
|
802
|
-
}
|
803
|
-
</pre>
|
804
|
-
</div>
|
805
|
-
</div>
|
806
|
-
</div>
|
807
|
-
|
808
|
-
<div id="method-M000298" class="method-detail">
|
809
|
-
<a name="M000298"></a>
|
810
|
-
|
811
|
-
<div class="method-heading">
|
812
|
-
<a href="#M000298" class="method-signature">
|
813
|
-
<span class="method-name">reader.depth → depth<br />
|
814
|
-
</span>
|
815
|
-
</a>
|
816
|
-
</div>
|
817
|
-
|
818
|
-
<div class="method-description">
|
819
|
-
<p>
|
820
|
-
Get the <a href="Reader.html#M000298">depth</a> of the node in the tree.
|
821
|
-
</p>
|
822
|
-
<p><a class="source-toggle" href="#"
|
823
|
-
onclick="toggleCode('M000298-source');return false;">[Source]</a></p>
|
824
|
-
<div class="method-source-code" id="M000298-source">
|
825
|
-
<pre>
|
826
|
-
/*
|
827
|
-
* call-seq:
|
828
|
-
* reader.depth -> depth
|
829
|
-
*
|
830
|
-
* Get the depth of the node in the tree.
|
831
|
-
*/
|
832
|
-
static VALUE
|
833
|
-
ruby_xml_reader_depth(VALUE self)
|
834
|
-
{
|
835
|
-
return INT2FIX(xmlTextReaderDepth(ruby_xml_text_reader_get(self)));
|
836
|
-
}
|
837
|
-
</pre>
|
838
|
-
</div>
|
839
|
-
</div>
|
840
|
-
</div>
|
841
|
-
|
842
|
-
<div id="method-M000311" class="method-detail">
|
843
|
-
<a name="M000311"></a>
|
844
|
-
|
845
|
-
<div class="method-heading">
|
846
|
-
<a href="#M000311" class="method-signature">
|
847
|
-
<span class="method-name">reader.empty_element? → bool<br />
|
848
|
-
</span>
|
849
|
-
</a>
|
850
|
-
</div>
|
851
|
-
|
852
|
-
<div class="method-description">
|
853
|
-
<p>
|
854
|
-
Check if the current node is empty.
|
855
|
-
</p>
|
856
|
-
<p><a class="source-toggle" href="#"
|
857
|
-
onclick="toggleCode('M000311-source');return false;">[Source]</a></p>
|
858
|
-
<div class="method-source-code" id="M000311-source">
|
859
|
-
<pre>
|
860
|
-
/*
|
861
|
-
* call-seq:
|
862
|
-
* reader.empty_element? -> bool
|
863
|
-
*
|
864
|
-
* Check if the current node is empty.
|
865
|
-
*/
|
866
|
-
static VALUE
|
867
|
-
ruby_xml_reader_empty_element(VALUE self)
|
868
|
-
{
|
869
|
-
return xmlTextReaderIsEmptyElement(ruby_xml_text_reader_get(self)) ? Qtrue : Qfalse;
|
870
|
-
}
|
871
|
-
</pre>
|
872
|
-
</div>
|
873
|
-
</div>
|
874
|
-
</div>
|
875
|
-
|
876
|
-
<div id="method-M000292" class="method-detail">
|
877
|
-
<a name="M000292"></a>
|
878
|
-
|
879
|
-
<div class="method-heading">
|
880
|
-
<a href="#M000292" class="method-signature">
|
881
|
-
<span class="method-name">reader.encoding → encoding<br />
|
882
|
-
</span>
|
883
|
-
</a>
|
884
|
-
</div>
|
885
|
-
|
886
|
-
<div class="method-description">
|
887
|
-
<p>
|
888
|
-
Determine the <a href="Reader.html#M000292">encoding</a> of the document
|
889
|
-
being <a href="Reader.html#M000277">read</a>.
|
890
|
-
</p>
|
891
|
-
<p><a class="source-toggle" href="#"
|
892
|
-
onclick="toggleCode('M000292-source');return false;">[Source]</a></p>
|
893
|
-
<div class="method-source-code" id="M000292-source">
|
894
|
-
<pre>
|
895
|
-
/*
|
896
|
-
* call-seq:
|
897
|
-
* reader.encoding -> encoding
|
898
|
-
*
|
899
|
-
* Determine the encoding of the document being read.
|
900
|
-
*/
|
901
|
-
static VALUE
|
902
|
-
ruby_xml_reader_encoding(VALUE self)
|
903
|
-
{
|
904
|
-
return CSTR2RVAL(xmlTextReaderConstEncoding(ruby_xml_text_reader_get(self)));
|
905
|
-
}
|
906
|
-
</pre>
|
907
|
-
</div>
|
908
|
-
</div>
|
909
|
-
</div>
|
910
|
-
|
911
|
-
<div id="method-M000306" class="method-detail">
|
912
|
-
<a name="M000306"></a>
|
913
|
-
|
914
|
-
<div class="method-heading">
|
915
|
-
<a href="#M000306" class="method-signature">
|
916
|
-
<span class="method-name">reader.expand → node<br />
|
917
|
-
</span>
|
918
|
-
</a>
|
919
|
-
</div>
|
920
|
-
|
921
|
-
<div class="method-description">
|
922
|
-
<p>
|
923
|
-
Read the contents of the current node and the full subtree. It then makes
|
924
|
-
the subtree available until the <a href="Reader.html#M000275">next</a> <a
|
925
|
-
href="Reader.html#M000277">read</a> call.
|
926
|
-
</p>
|
927
|
-
<p>
|
928
|
-
Return an <a href="Node.html">XML::Node</a> object, or nil in case of
|
929
|
-
error.
|
930
|
-
</p>
|
931
|
-
<p><a class="source-toggle" href="#"
|
932
|
-
onclick="toggleCode('M000306-source');return false;">[Source]</a></p>
|
933
|
-
<div class="method-source-code" id="M000306-source">
|
934
|
-
<pre>
|
935
|
-
/*
|
936
|
-
* call-seq:
|
937
|
-
* reader.expand -> node
|
938
|
-
*
|
939
|
-
* Read the contents of the current node and the full subtree. It then makes
|
940
|
-
* the subtree available until the next read call.
|
941
|
-
*
|
942
|
-
* Return an XML::Node object, or nil in case of error.
|
943
|
-
*/
|
944
|
-
static VALUE
|
945
|
-
ruby_xml_reader_expand(VALUE self)
|
946
|
-
{
|
947
|
-
xmlNodePtr node;
|
948
|
-
xmlDocPtr doc;
|
949
|
-
xmlTextReaderPtr reader = ruby_xml_text_reader_get(self);
|
950
|
-
node = xmlTextReaderExpand(reader);
|
951
|
-
|
952
|
-
if (!node)
|
953
|
-
return Qnil;
|
954
|
-
|
955
|
-
/* Okay this is tricky. By accessing the returned node, we
|
956
|
-
take ownership of the reader's document. Thus we need to
|
957
|
-
tell the reader to not free it. Otherwise it will be
|
958
|
-
freed twice - once when the Ruby document wrapper goes
|
959
|
-
out of scope and once when the reader goes out of scope. */
|
960
|
-
|
961
|
-
xmlTextReaderPreserve(reader);
|
962
|
-
doc = xmlTextReaderCurrentDoc(reader);
|
963
|
-
ruby_xml_document_wrap(doc);
|
964
|
-
|
965
|
-
return ruby_xml_node2_wrap(cXMLNode, node);
|
966
|
-
}
|
967
|
-
</pre>
|
968
|
-
</div>
|
969
|
-
</div>
|
970
|
-
</div>
|
971
|
-
|
972
|
-
<div id="method-M000301" class="method-detail">
|
973
|
-
<a name="M000301"></a>
|
974
|
-
|
975
|
-
<div class="method-heading">
|
976
|
-
<a href="#M000301" class="method-signature">
|
977
|
-
<span class="method-name">reader.has_attributes? → bool<br />
|
978
|
-
</span>
|
979
|
-
</a>
|
980
|
-
</div>
|
981
|
-
|
982
|
-
<div class="method-description">
|
983
|
-
<p>
|
984
|
-
Get whether the node has attributes.
|
985
|
-
</p>
|
986
|
-
<p><a class="source-toggle" href="#"
|
987
|
-
onclick="toggleCode('M000301-source');return false;">[Source]</a></p>
|
988
|
-
<div class="method-source-code" id="M000301-source">
|
989
|
-
<pre>
|
990
|
-
/*
|
991
|
-
* call-seq:
|
992
|
-
* reader.has_attributes? -> bool
|
993
|
-
*
|
994
|
-
* Get whether the node has attributes.
|
995
|
-
*/
|
996
|
-
static VALUE
|
997
|
-
ruby_xml_reader_has_attributes(VALUE self)
|
998
|
-
{
|
999
|
-
return xmlTextReaderHasAttributes(ruby_xml_text_reader_get(self)) ? Qtrue : Qfalse;
|
1000
|
-
}
|
1001
|
-
</pre>
|
1002
|
-
</div>
|
1003
|
-
</div>
|
1004
|
-
</div>
|
1005
|
-
|
1006
|
-
<div id="method-M000303" class="method-detail">
|
1007
|
-
<a name="M000303"></a>
|
1008
|
-
|
1009
|
-
<div class="method-heading">
|
1010
|
-
<a href="#M000303" class="method-signature">
|
1011
|
-
<span class="method-name">reader.has_value? → bool<br />
|
1012
|
-
</span>
|
1013
|
-
</a>
|
1014
|
-
</div>
|
1015
|
-
|
1016
|
-
<div class="method-description">
|
1017
|
-
<p>
|
1018
|
-
Get whether the node can have a text <a
|
1019
|
-
href="Reader.html#M000304">value</a>.
|
1020
|
-
</p>
|
1021
|
-
<p><a class="source-toggle" href="#"
|
1022
|
-
onclick="toggleCode('M000303-source');return false;">[Source]</a></p>
|
1023
|
-
<div class="method-source-code" id="M000303-source">
|
1024
|
-
<pre>
|
1025
|
-
/*
|
1026
|
-
* call-seq:
|
1027
|
-
* reader.has_value? -> bool
|
1028
|
-
*
|
1029
|
-
* Get whether the node can have a text value.
|
1030
|
-
*/
|
1031
|
-
static VALUE
|
1032
|
-
ruby_xml_reader_has_value(VALUE self)
|
1033
|
-
{
|
1034
|
-
return xmlTextReaderHasValue(ruby_xml_text_reader_get(self)) ? Qtrue : Qfalse;
|
1035
|
-
}
|
1036
|
-
</pre>
|
1037
|
-
</div>
|
1038
|
-
</div>
|
1039
|
-
</div>
|
1040
|
-
|
1041
|
-
<div id="method-M000309" class="method-detail">
|
1042
|
-
<a name="M000309"></a>
|
1043
|
-
|
1044
|
-
<div class="method-heading">
|
1045
|
-
<a href="#M000309" class="method-signature">
|
1046
|
-
<span class="method-name">reader.line_number → number<br />
|
1047
|
-
</span>
|
1048
|
-
</a>
|
1049
|
-
</div>
|
1050
|
-
|
1051
|
-
<div class="method-description">
|
1052
|
-
<p>
|
1053
|
-
Provide the line number of the current parsing point.
|
1054
|
-
</p>
|
1055
|
-
<p><a class="source-toggle" href="#"
|
1056
|
-
onclick="toggleCode('M000309-source');return false;">[Source]</a></p>
|
1057
|
-
<div class="method-source-code" id="M000309-source">
|
1058
|
-
<pre>
|
1059
|
-
/*
|
1060
|
-
* call-seq:
|
1061
|
-
* reader.line_number -> number
|
1062
|
-
*
|
1063
|
-
* Provide the line number of the current parsing point.
|
1064
|
-
*/
|
1065
|
-
static VALUE
|
1066
|
-
ruby_xml_reader_line_number(VALUE self)
|
1067
|
-
{
|
1068
|
-
return INT2NUM(xmlTextReaderGetParserLineNumber(ruby_xml_text_reader_get(self)));
|
1069
|
-
}
|
1070
|
-
</pre>
|
1071
|
-
</div>
|
1072
|
-
</div>
|
1073
|
-
</div>
|
1074
|
-
|
1075
|
-
<div id="method-M000291" class="method-detail">
|
1076
|
-
<a name="M000291"></a>
|
1077
|
-
|
1078
|
-
<div class="method-heading">
|
1079
|
-
<a href="#M000291" class="method-signature">
|
1080
|
-
<span class="method-name">reader.local_name → name<br />
|
1081
|
-
</span>
|
1082
|
-
</a>
|
1083
|
-
</div>
|
1084
|
-
|
1085
|
-
<div class="method-description">
|
1086
|
-
<p>
|
1087
|
-
Return the local <a href="Reader.html#M000290">name</a> of the node.
|
1088
|
-
</p>
|
1089
|
-
<p><a class="source-toggle" href="#"
|
1090
|
-
onclick="toggleCode('M000291-source');return false;">[Source]</a></p>
|
1091
|
-
<div class="method-source-code" id="M000291-source">
|
1092
|
-
<pre>
|
1093
|
-
/*
|
1094
|
-
* call-seq:
|
1095
|
-
* reader.local_name -> name
|
1096
|
-
*
|
1097
|
-
* Return the local name of the node.
|
1098
|
-
*/
|
1099
|
-
static VALUE
|
1100
|
-
ruby_xml_reader_local_name(VALUE self)
|
1101
|
-
{
|
1102
|
-
return CSTR2RVAL(xmlTextReaderConstLocalName(ruby_xml_text_reader_get(self)));
|
1103
|
-
}
|
1104
|
-
</pre>
|
1105
|
-
</div>
|
1106
|
-
</div>
|
1107
|
-
</div>
|
1108
|
-
|
1109
|
-
<div id="method-M000305" class="method-detail">
|
1110
|
-
<a name="M000305"></a>
|
1111
|
-
|
1112
|
-
<div class="method-heading">
|
1113
|
-
<a href="#M000305" class="method-signature">
|
1114
|
-
<span class="method-name">reader.lookup_namespace(prefix) → value<br />
|
1115
|
-
</span>
|
1116
|
-
</a>
|
1117
|
-
</div>
|
1118
|
-
|
1119
|
-
<div class="method-description">
|
1120
|
-
<p>
|
1121
|
-
Resolve a namespace <a href="Reader.html#M000297">prefix</a> in the scope
|
1122
|
-
of the current element. To return the default namespace, specify nil as
|
1123
|
-
<tt><a href="Reader.html#M000297">prefix</a></tt>.
|
1124
|
-
</p>
|
1125
|
-
<p><a class="source-toggle" href="#"
|
1126
|
-
onclick="toggleCode('M000305-source');return false;">[Source]</a></p>
|
1127
|
-
<div class="method-source-code" id="M000305-source">
|
1128
|
-
<pre>
|
1129
|
-
/*
|
1130
|
-
* call-seq:
|
1131
|
-
* reader.lookup_namespace(prefix) -> value
|
1132
|
-
*
|
1133
|
-
* Resolve a namespace prefix in the scope of the current element.
|
1134
|
-
* To return the default namespace, specify nil as +prefix+.
|
1135
|
-
*/
|
1136
|
-
static VALUE
|
1137
|
-
ruby_xml_reader_lookup_namespace(VALUE self, VALUE prefix)
|
1138
|
-
{
|
1139
|
-
return CSTR2RVAL2(xmlTextReaderLookupNamespace(ruby_xml_text_reader_get(self), (const xmlChar *)RVAL2CSTR(prefix)));
|
1140
|
-
}
|
1141
|
-
</pre>
|
1142
|
-
</div>
|
1143
|
-
</div>
|
1144
|
-
</div>
|
1145
|
-
|
1146
|
-
<div id="method-M000271" class="method-detail">
|
1147
|
-
<a name="M000271"></a>
|
1148
|
-
|
1149
|
-
<div class="method-heading">
|
1150
|
-
<a href="#M000271" class="method-signature">
|
1151
|
-
<span class="method-name">parser.move_to_attribute(val) → code<br />
|
1152
|
-
</span>
|
1153
|
-
</a>
|
1154
|
-
</div>
|
1155
|
-
|
1156
|
-
<div class="method-description">
|
1157
|
-
<p>
|
1158
|
-
Move the position of the current instance to the attribute with the
|
1159
|
-
specified index (if <tt>val</tt> is an integer) or <a
|
1160
|
-
href="Reader.html#M000290">name</a> (if <tt>val</tt> is a string) relative
|
1161
|
-
to the containing element.
|
1162
|
-
</p>
|
1163
|
-
<p><a class="source-toggle" href="#"
|
1164
|
-
onclick="toggleCode('M000271-source');return false;">[Source]</a></p>
|
1165
|
-
<div class="method-source-code" id="M000271-source">
|
1166
|
-
<pre>
|
1167
|
-
/*
|
1168
|
-
* call-seq:
|
1169
|
-
* parser.move_to_attribute(val) -> code
|
1170
|
-
*
|
1171
|
-
* Move the position of the current instance to the attribute with the
|
1172
|
-
* specified index (if +val+ is an integer) or name (if +val+ is a string)
|
1173
|
-
* relative to the containing element.
|
1174
|
-
*/
|
1175
|
-
static VALUE
|
1176
|
-
ruby_xml_reader_move_to_attr(VALUE self, VALUE val)
|
1177
|
-
{
|
1178
|
-
xmlTextReaderPtr reader;
|
1179
|
-
int ret;
|
1180
|
-
|
1181
|
-
reader = ruby_xml_text_reader_get(self);
|
1182
|
-
|
1183
|
-
if (TYPE(val) == T_FIXNUM) {
|
1184
|
-
ret = xmlTextReaderMoveToAttributeNo(reader, FIX2INT(val));
|
1185
|
-
}
|
1186
|
-
else {
|
1187
|
-
ret = xmlTextReaderMoveToAttribute(reader, (const xmlChar *)RVAL2CSTR(val));
|
1188
|
-
}
|
1189
|
-
|
1190
|
-
return INT2FIX(ret);
|
1191
|
-
}
|
1192
|
-
</pre>
|
1193
|
-
</div>
|
1194
|
-
</div>
|
1195
|
-
</div>
|
1196
|
-
|
1197
|
-
<div id="method-M000274" class="method-detail">
|
1198
|
-
<a name="M000274"></a>
|
1199
|
-
|
1200
|
-
<div class="method-heading">
|
1201
|
-
<a href="#M000274" class="method-signature">
|
1202
|
-
<span class="method-name">reader.move_to_element → code<br />
|
1203
|
-
</span>
|
1204
|
-
</a>
|
1205
|
-
</div>
|
1206
|
-
|
1207
|
-
<div class="method-description">
|
1208
|
-
<p>
|
1209
|
-
Move the position of the current instance to the node that contains the
|
1210
|
-
current attribute node.
|
1211
|
-
</p>
|
1212
|
-
<p><a class="source-toggle" href="#"
|
1213
|
-
onclick="toggleCode('M000274-source');return false;">[Source]</a></p>
|
1214
|
-
<div class="method-source-code" id="M000274-source">
|
1215
|
-
<pre>
|
1216
|
-
/*
|
1217
|
-
* call-seq:
|
1218
|
-
* reader.move_to_element -> code
|
1219
|
-
*
|
1220
|
-
* Move the position of the current instance to the node that contains the
|
1221
|
-
* current attribute node.
|
1222
|
-
*/
|
1223
|
-
static VALUE
|
1224
|
-
ruby_xml_reader_move_to_element(VALUE self)
|
1225
|
-
{
|
1226
|
-
return INT2FIX(xmlTextReaderMoveToElement(ruby_xml_text_reader_get(self)));
|
1227
|
-
}
|
1228
|
-
</pre>
|
1229
|
-
</div>
|
1230
|
-
</div>
|
1231
|
-
</div>
|
1232
|
-
|
1233
|
-
<div id="method-M000272" class="method-detail">
|
1234
|
-
<a name="M000272"></a>
|
1235
|
-
|
1236
|
-
<div class="method-heading">
|
1237
|
-
<a href="#M000272" class="method-signature">
|
1238
|
-
<span class="method-name">reader.move_to_first_attribute → code<br />
|
1239
|
-
</span>
|
1240
|
-
</a>
|
1241
|
-
</div>
|
1242
|
-
|
1243
|
-
<div class="method-description">
|
1244
|
-
<p>
|
1245
|
-
Move the position of the current instance to the first attribute associated
|
1246
|
-
with the current node.
|
1247
|
-
</p>
|
1248
|
-
<p><a class="source-toggle" href="#"
|
1249
|
-
onclick="toggleCode('M000272-source');return false;">[Source]</a></p>
|
1250
|
-
<div class="method-source-code" id="M000272-source">
|
1251
|
-
<pre>
|
1252
|
-
/*
|
1253
|
-
* call-seq:
|
1254
|
-
* reader.move_to_first_attribute -> code
|
1255
|
-
*
|
1256
|
-
* Move the position of the current instance to the first attribute associated
|
1257
|
-
* with the current node.
|
1258
|
-
*/
|
1259
|
-
static VALUE
|
1260
|
-
ruby_xml_reader_move_to_first_attr(VALUE self)
|
1261
|
-
{
|
1262
|
-
return INT2FIX(xmlTextReaderMoveToFirstAttribute(ruby_xml_text_reader_get(self)));
|
1263
|
-
}
|
1264
|
-
</pre>
|
1265
|
-
</div>
|
1266
|
-
</div>
|
1267
|
-
</div>
|
1268
|
-
|
1269
|
-
<div id="method-M000273" class="method-detail">
|
1270
|
-
<a name="M000273"></a>
|
1271
|
-
|
1272
|
-
<div class="method-heading">
|
1273
|
-
<a href="#M000273" class="method-signature">
|
1274
|
-
<span class="method-name">reader.move_to_next_attribute → code<br />
|
1275
|
-
</span>
|
1276
|
-
</a>
|
1277
|
-
</div>
|
1278
|
-
|
1279
|
-
<div class="method-description">
|
1280
|
-
<p>
|
1281
|
-
Move the position of the current instance to the <a
|
1282
|
-
href="Reader.html#M000275">next</a> attribute associated with the current
|
1283
|
-
node.
|
1284
|
-
</p>
|
1285
|
-
<p><a class="source-toggle" href="#"
|
1286
|
-
onclick="toggleCode('M000273-source');return false;">[Source]</a></p>
|
1287
|
-
<div class="method-source-code" id="M000273-source">
|
1288
|
-
<pre>
|
1289
|
-
/*
|
1290
|
-
* call-seq:
|
1291
|
-
* reader.move_to_next_attribute -> code
|
1292
|
-
*
|
1293
|
-
* Move the position of the current instance to the next attribute associated
|
1294
|
-
* with the current node.
|
1295
|
-
*/
|
1296
|
-
static VALUE
|
1297
|
-
ruby_xml_reader_move_to_next_attr(VALUE self)
|
1298
|
-
{
|
1299
|
-
return INT2FIX(xmlTextReaderMoveToNextAttribute(ruby_xml_text_reader_get(self)));
|
1300
|
-
}
|
1301
|
-
</pre>
|
1302
|
-
</div>
|
1303
|
-
</div>
|
1304
|
-
</div>
|
1305
|
-
|
1306
|
-
<div id="method-M000290" class="method-detail">
|
1307
|
-
<a name="M000290"></a>
|
1308
|
-
|
1309
|
-
<div class="method-heading">
|
1310
|
-
<a href="#M000290" class="method-signature">
|
1311
|
-
<span class="method-name">reader.name → name<br />
|
1312
|
-
</span>
|
1313
|
-
</a>
|
1314
|
-
</div>
|
1315
|
-
|
1316
|
-
<div class="method-description">
|
1317
|
-
<p>
|
1318
|
-
Return the qualified <a href="Reader.html#M000290">name</a> of the node.
|
1319
|
-
</p>
|
1320
|
-
<p><a class="source-toggle" href="#"
|
1321
|
-
onclick="toggleCode('M000290-source');return false;">[Source]</a></p>
|
1322
|
-
<div class="method-source-code" id="M000290-source">
|
1323
|
-
<pre>
|
1324
|
-
/*
|
1325
|
-
* call-seq:
|
1326
|
-
* reader.name -> name
|
1327
|
-
*
|
1328
|
-
* Return the qualified name of the node.
|
1329
|
-
*/
|
1330
|
-
static VALUE
|
1331
|
-
ruby_xml_reader_name(VALUE self)
|
1332
|
-
{
|
1333
|
-
return CSTR2RVAL(xmlTextReaderConstName(ruby_xml_text_reader_get(self)));
|
1334
|
-
}
|
1335
|
-
</pre>
|
1336
|
-
</div>
|
1337
|
-
</div>
|
1338
|
-
</div>
|
1339
|
-
|
1340
|
-
<div id="method-M000312" class="method-detail">
|
1341
|
-
<a name="M000312"></a>
|
1342
|
-
|
1343
|
-
<div class="method-heading">
|
1344
|
-
<a href="#M000312" class="method-signature">
|
1345
|
-
<span class="method-name">reader.namespace_declaration? → bool<br />
|
1346
|
-
</span>
|
1347
|
-
</a>
|
1348
|
-
</div>
|
1349
|
-
|
1350
|
-
<div class="method-description">
|
1351
|
-
<p>
|
1352
|
-
Determine whether the current node is a namespace declaration rather than a
|
1353
|
-
regular attribute.
|
1354
|
-
</p>
|
1355
|
-
<p><a class="source-toggle" href="#"
|
1356
|
-
onclick="toggleCode('M000312-source');return false;">[Source]</a></p>
|
1357
|
-
<div class="method-source-code" id="M000312-source">
|
1358
|
-
<pre>
|
1359
|
-
/*
|
1360
|
-
* call-seq:
|
1361
|
-
* reader.namespace_declaration? -> bool
|
1362
|
-
*
|
1363
|
-
* Determine whether the current node is a namespace declaration rather than a
|
1364
|
-
* regular attribute.
|
1365
|
-
*/
|
1366
|
-
static VALUE
|
1367
|
-
ruby_xml_reader_namespace_declaration(VALUE self)
|
1368
|
-
{
|
1369
|
-
return xmlTextReaderIsNamespaceDecl(ruby_xml_text_reader_get(self)) ? Qtrue : Qfalse;
|
1370
|
-
}
|
1371
|
-
</pre>
|
1372
|
-
</div>
|
1373
|
-
</div>
|
1374
|
-
</div>
|
1375
|
-
|
1376
|
-
<div id="method-M000294" class="method-detail">
|
1377
|
-
<a name="M000294"></a>
|
1378
|
-
|
1379
|
-
<div class="method-heading">
|
1380
|
-
<a href="#M000294" class="method-signature">
|
1381
|
-
<span class="method-name">reader.namespace_uri → URI<br />
|
1382
|
-
</span>
|
1383
|
-
</a>
|
1384
|
-
</div>
|
1385
|
-
|
1386
|
-
<div class="method-description">
|
1387
|
-
<p>
|
1388
|
-
Determine the namespace URI of the node.
|
1389
|
-
</p>
|
1390
|
-
<p><a class="source-toggle" href="#"
|
1391
|
-
onclick="toggleCode('M000294-source');return false;">[Source]</a></p>
|
1392
|
-
<div class="method-source-code" id="M000294-source">
|
1393
|
-
<pre>
|
1394
|
-
/*
|
1395
|
-
* call-seq:
|
1396
|
-
* reader.namespace_uri -> URI
|
1397
|
-
*
|
1398
|
-
* Determine the namespace URI of the node.
|
1399
|
-
*/
|
1400
|
-
static VALUE
|
1401
|
-
ruby_xml_reader_namespace_uri(VALUE self)
|
1402
|
-
{
|
1403
|
-
return CSTR2RVAL(xmlTextReaderConstNamespaceUri(ruby_xml_text_reader_get(self)));
|
1404
|
-
}
|
1405
|
-
</pre>
|
1406
|
-
</div>
|
1407
|
-
</div>
|
1408
|
-
</div>
|
1409
|
-
|
1410
|
-
<div id="method-M000275" class="method-detail">
|
1411
|
-
<a name="M000275"></a>
|
1412
|
-
|
1413
|
-
<div class="method-heading">
|
1414
|
-
<a href="#M000275" class="method-signature">
|
1415
|
-
<span class="method-name">reader.next → code<br />
|
1416
|
-
</span>
|
1417
|
-
</a>
|
1418
|
-
</div>
|
1419
|
-
|
1420
|
-
<div class="method-description">
|
1421
|
-
<p>
|
1422
|
-
Skip to the node following the current one in document order while avoiding
|
1423
|
-
the subtree if any.
|
1424
|
-
</p>
|
1425
|
-
<p><a class="source-toggle" href="#"
|
1426
|
-
onclick="toggleCode('M000275-source');return false;">[Source]</a></p>
|
1427
|
-
<div class="method-source-code" id="M000275-source">
|
1428
|
-
<pre>
|
1429
|
-
/*
|
1430
|
-
* call-seq:
|
1431
|
-
* reader.next -> code
|
1432
|
-
*
|
1433
|
-
* Skip to the node following the current one in document order while avoiding
|
1434
|
-
* the subtree if any.
|
1435
|
-
*/
|
1436
|
-
static VALUE
|
1437
|
-
ruby_xml_reader_next(VALUE self)
|
1438
|
-
{
|
1439
|
-
return INT2FIX(xmlTextReaderNext(ruby_xml_text_reader_get(self)));
|
1440
|
-
}
|
1441
|
-
</pre>
|
1442
|
-
</div>
|
1443
|
-
</div>
|
1444
|
-
</div>
|
1445
|
-
|
1446
|
-
<div id="method-M000276" class="method-detail">
|
1447
|
-
<a name="M000276"></a>
|
1448
|
-
|
1449
|
-
<div class="method-heading">
|
1450
|
-
<a href="#M000276" class="method-signature">
|
1451
|
-
<span class="method-name">reader.next_sibling → code<br />
|
1452
|
-
</span>
|
1453
|
-
</a>
|
1454
|
-
</div>
|
1455
|
-
|
1456
|
-
<div class="method-description">
|
1457
|
-
<p>
|
1458
|
-
Skip to the node following the current one in document order while avoiding
|
1459
|
-
the subtree if any. Currently implemented only for Readers built on a
|
1460
|
-
document.
|
1461
|
-
</p>
|
1462
|
-
<p><a class="source-toggle" href="#"
|
1463
|
-
onclick="toggleCode('M000276-source');return false;">[Source]</a></p>
|
1464
|
-
<div class="method-source-code" id="M000276-source">
|
1465
|
-
<pre>
|
1466
|
-
/*
|
1467
|
-
* call-seq:
|
1468
|
-
* reader.next_sibling -> code
|
1469
|
-
*
|
1470
|
-
* Skip to the node following the current one in document order while avoiding
|
1471
|
-
* the subtree if any. Currently implemented only for Readers built on a
|
1472
|
-
* document.
|
1473
|
-
*/
|
1474
|
-
static VALUE
|
1475
|
-
ruby_xml_reader_next_sibling(VALUE self)
|
1476
|
-
{
|
1477
|
-
return INT2FIX(xmlTextReaderNextSibling(ruby_xml_text_reader_get(self)));
|
1478
|
-
}
|
1479
|
-
</pre>
|
1480
|
-
</div>
|
1481
|
-
</div>
|
1482
|
-
</div>
|
1483
|
-
|
1484
|
-
<div id="method-M000287" class="method-detail">
|
1485
|
-
<a name="M000287"></a>
|
1486
|
-
|
1487
|
-
<div class="method-heading">
|
1488
|
-
<a href="#M000287" class="method-signature">
|
1489
|
-
<span class="method-name">reader.node_type → type<br />
|
1490
|
-
</span>
|
1491
|
-
</a>
|
1492
|
-
</div>
|
1493
|
-
|
1494
|
-
<div class="method-description">
|
1495
|
-
<p>
|
1496
|
-
Get the node type of the current node. Reference: <a
|
1497
|
-
href="http://dotgnu.org/pnetlib-doc/System/Xml/XmlNodeType.html">dotgnu.org/pnetlib-doc/System/Xml/XmlNodeType.html</a>
|
1498
|
-
</p>
|
1499
|
-
<p><a class="source-toggle" href="#"
|
1500
|
-
onclick="toggleCode('M000287-source');return false;">[Source]</a></p>
|
1501
|
-
<div class="method-source-code" id="M000287-source">
|
1502
|
-
<pre>
|
1503
|
-
/*
|
1504
|
-
* call-seq:
|
1505
|
-
* reader.node_type -> type
|
1506
|
-
*
|
1507
|
-
* Get the node type of the current node. Reference:
|
1508
|
-
* http://dotgnu.org/pnetlib-doc/System/Xml/XmlNodeType.html
|
1509
|
-
*/
|
1510
|
-
static VALUE
|
1511
|
-
ruby_xml_reader_node_type(VALUE self)
|
1512
|
-
{
|
1513
|
-
return INT2FIX(xmlTextReaderNodeType(ruby_xml_text_reader_get(self)));
|
1514
|
-
}
|
1515
|
-
</pre>
|
1516
|
-
</div>
|
1517
|
-
</div>
|
1518
|
-
</div>
|
1519
|
-
|
1520
|
-
<div id="method-M000288" class="method-detail">
|
1521
|
-
<a name="M000288"></a>
|
1522
|
-
|
1523
|
-
<div class="method-heading">
|
1524
|
-
<a href="#M000288" class="method-signature">
|
1525
|
-
<span class="method-name">reader.normalization → value<br />
|
1526
|
-
</span>
|
1527
|
-
</a>
|
1528
|
-
</div>
|
1529
|
-
|
1530
|
-
<div class="method-description">
|
1531
|
-
<p>
|
1532
|
-
The <a href="Reader.html#M000304">value</a> indicating whether to normalize
|
1533
|
-
white space and attribute values. Since attribute <a
|
1534
|
-
href="Reader.html#M000304">value</a> and end of line normalizations are a
|
1535
|
-
MUST in the <a href="../XML.html">XML</a> specification only the <a
|
1536
|
-
href="Reader.html#M000304">value</a> true is accepted. The broken bahaviour
|
1537
|
-
of accepting out of range character entities like &0; is of course not
|
1538
|
-
supported either.
|
1539
|
-
</p>
|
1540
|
-
<p>
|
1541
|
-
Return 1 or -1 in case of error.
|
1542
|
-
</p>
|
1543
|
-
<p><a class="source-toggle" href="#"
|
1544
|
-
onclick="toggleCode('M000288-source');return false;">[Source]</a></p>
|
1545
|
-
<div class="method-source-code" id="M000288-source">
|
1546
|
-
<pre>
|
1547
|
-
/*
|
1548
|
-
* call-seq:
|
1549
|
-
* reader.normalization -> value
|
1550
|
-
*
|
1551
|
-
* The value indicating whether to normalize white space and attribute values.
|
1552
|
-
* Since attribute value and end of line normalizations are a MUST in the XML
|
1553
|
-
* specification only the value true is accepted. The broken bahaviour of
|
1554
|
-
* accepting out of range character entities like &#0; is of course not
|
1555
|
-
* supported either.
|
1556
|
-
*
|
1557
|
-
* Return 1 or -1 in case of error.
|
1558
|
-
*/
|
1559
|
-
static VALUE
|
1560
|
-
ruby_xml_reader_normalization(VALUE self)
|
1561
|
-
{
|
1562
|
-
return INT2FIX(xmlTextReaderNormalization(ruby_xml_text_reader_get(self)));
|
1563
|
-
}
|
1564
|
-
</pre>
|
1565
|
-
</div>
|
1566
|
-
</div>
|
1567
|
-
</div>
|
1568
|
-
|
1569
|
-
<div id="method-M000297" class="method-detail">
|
1570
|
-
<a name="M000297"></a>
|
1571
|
-
|
1572
|
-
<div class="method-heading">
|
1573
|
-
<a href="#M000297" class="method-signature">
|
1574
|
-
<span class="method-name">reader.prefix → prefix<br />
|
1575
|
-
</span>
|
1576
|
-
</a>
|
1577
|
-
</div>
|
1578
|
-
|
1579
|
-
<div class="method-description">
|
1580
|
-
<p>
|
1581
|
-
Get a shorthand reference to the namespace associated with the node.
|
1582
|
-
</p>
|
1583
|
-
<p><a class="source-toggle" href="#"
|
1584
|
-
onclick="toggleCode('M000297-source');return false;">[Source]</a></p>
|
1585
|
-
<div class="method-source-code" id="M000297-source">
|
1586
|
-
<pre>
|
1587
|
-
/*
|
1588
|
-
* call-seq:
|
1589
|
-
* reader.prefix -> prefix
|
1590
|
-
*
|
1591
|
-
* Get a shorthand reference to the namespace associated with the node.
|
1592
|
-
*/
|
1593
|
-
static VALUE
|
1594
|
-
ruby_xml_reader_prefix(VALUE self)
|
1595
|
-
{
|
1596
|
-
return CSTR2RVAL(xmlTextReaderConstPrefix(ruby_xml_text_reader_get(self)));
|
1597
|
-
}
|
1598
|
-
</pre>
|
1599
|
-
</div>
|
1600
|
-
</div>
|
1601
|
-
</div>
|
1602
|
-
|
1603
|
-
<div id="method-M000299" class="method-detail">
|
1604
|
-
<a name="M000299"></a>
|
1605
|
-
|
1606
|
-
<div class="method-heading">
|
1607
|
-
<a href="#M000299" class="method-signature">
|
1608
|
-
<span class="method-name">reader.quote_char → char<br />
|
1609
|
-
</span>
|
1610
|
-
</a>
|
1611
|
-
</div>
|
1612
|
-
|
1613
|
-
<div class="method-description">
|
1614
|
-
<p>
|
1615
|
-
Get the quotation mark character used to enclose the <a
|
1616
|
-
href="Reader.html#M000304">value</a> of an attribute, as an integer <a
|
1617
|
-
href="Reader.html#M000304">value</a> (and -1 in case of error).
|
1618
|
-
</p>
|
1619
|
-
<p><a class="source-toggle" href="#"
|
1620
|
-
onclick="toggleCode('M000299-source');return false;">[Source]</a></p>
|
1621
|
-
<div class="method-source-code" id="M000299-source">
|
1622
|
-
<pre>
|
1623
|
-
/*
|
1624
|
-
* call-seq:
|
1625
|
-
* reader.quote_char -> char
|
1626
|
-
*
|
1627
|
-
* Get the quotation mark character used to enclose the value of an attribute,
|
1628
|
-
* as an integer value (and -1 in case of error).
|
1629
|
-
*/
|
1630
|
-
static VALUE
|
1631
|
-
ruby_xml_reader_quote_char(VALUE self)
|
1632
|
-
{
|
1633
|
-
return INT2FIX(xmlTextReaderQuoteChar(ruby_xml_text_reader_get(self)));
|
1634
|
-
}
|
1635
|
-
</pre>
|
1636
|
-
</div>
|
1637
|
-
</div>
|
1638
|
-
</div>
|
1639
|
-
|
1640
|
-
<div id="method-M000277" class="method-detail">
|
1641
|
-
<a name="M000277"></a>
|
1642
|
-
|
1643
|
-
<div class="method-heading">
|
1644
|
-
<a href="#M000277" class="method-signature">
|
1645
|
-
<span class="method-name">reader.read → code<br />
|
1646
|
-
</span>
|
1647
|
-
</a>
|
1648
|
-
</div>
|
1649
|
-
|
1650
|
-
<div class="method-description">
|
1651
|
-
<p>
|
1652
|
-
Move the position of the current instance to the <a
|
1653
|
-
href="Reader.html#M000275">next</a> node in the stream, exposing its
|
1654
|
-
properties.
|
1655
|
-
</p>
|
1656
|
-
<p>
|
1657
|
-
Return 1 if the node was <a href="Reader.html#M000277">read</a>
|
1658
|
-
successfully, 0 if there is no more nodes to <a
|
1659
|
-
href="Reader.html#M000277">read</a>, or -1 in case of error.
|
1660
|
-
</p>
|
1661
|
-
<p><a class="source-toggle" href="#"
|
1662
|
-
onclick="toggleCode('M000277-source');return false;">[Source]</a></p>
|
1663
|
-
<div class="method-source-code" id="M000277-source">
|
1664
|
-
<pre>
|
1665
|
-
/*
|
1666
|
-
* call-seq:
|
1667
|
-
* reader.read -> code
|
1668
|
-
*
|
1669
|
-
* Move the position of the current instance to the next node in the stream,
|
1670
|
-
* exposing its properties.
|
1671
|
-
*
|
1672
|
-
* Return 1 if the node was read successfully, 0 if there is no more nodes to
|
1673
|
-
* read, or -1 in case of error.
|
1674
|
-
*/
|
1675
|
-
static VALUE
|
1676
|
-
ruby_xml_reader_read(VALUE self)
|
1677
|
-
{
|
1678
|
-
return INT2FIX(xmlTextReaderRead(ruby_xml_text_reader_get(self)));
|
1679
|
-
}
|
1680
|
-
</pre>
|
1681
|
-
</div>
|
1682
|
-
</div>
|
1683
|
-
</div>
|
1684
|
-
|
1685
|
-
<div id="method-M000278" class="method-detail">
|
1686
|
-
<a name="M000278"></a>
|
1687
|
-
|
1688
|
-
<div class="method-heading">
|
1689
|
-
<a href="#M000278" class="method-signature">
|
1690
|
-
<span class="method-name">reader.read_attribute_value → code<br />
|
1691
|
-
</span>
|
1692
|
-
</a>
|
1693
|
-
</div>
|
1694
|
-
|
1695
|
-
<div class="method-description">
|
1696
|
-
<p>
|
1697
|
-
Parse an attribute <a href="Reader.html#M000304">value</a> into one or more
|
1698
|
-
Text and EntityReference nodes.
|
1699
|
-
</p>
|
1700
|
-
<p>
|
1701
|
-
Return 1 in case of success, 0 if the reader was not positionned on an
|
1702
|
-
attribute node or all the attribute values have been <a
|
1703
|
-
href="Reader.html#M000277">read</a>, or -1 in case of error.
|
1704
|
-
</p>
|
1705
|
-
<p><a class="source-toggle" href="#"
|
1706
|
-
onclick="toggleCode('M000278-source');return false;">[Source]</a></p>
|
1707
|
-
<div class="method-source-code" id="M000278-source">
|
1708
|
-
<pre>
|
1709
|
-
/*
|
1710
|
-
* call-seq:
|
1711
|
-
* reader.read_attribute_value -> code
|
1712
|
-
*
|
1713
|
-
* Parse an attribute value into one or more Text and EntityReference nodes.
|
1714
|
-
*
|
1715
|
-
* Return 1 in case of success, 0 if the reader was not positionned on an
|
1716
|
-
* attribute node or all the attribute values have been read, or -1 in case of
|
1717
|
-
* error.
|
1718
|
-
*/
|
1719
|
-
static VALUE
|
1720
|
-
ruby_xml_reader_read_attr_value(VALUE self)
|
1721
|
-
{
|
1722
|
-
return INT2FIX(xmlTextReaderReadAttributeValue(ruby_xml_text_reader_get(self)));
|
1723
|
-
}
|
1724
|
-
</pre>
|
1725
|
-
</div>
|
1726
|
-
</div>
|
1727
|
-
</div>
|
1728
|
-
|
1729
|
-
<div id="method-M000279" class="method-detail">
|
1730
|
-
<a name="M000279"></a>
|
1731
|
-
|
1732
|
-
<div class="method-heading">
|
1733
|
-
<a href="#M000279" class="method-signature">
|
1734
|
-
<span class="method-name">reader.read_inner_xml → data<br />
|
1735
|
-
</span>
|
1736
|
-
</a>
|
1737
|
-
</div>
|
1738
|
-
|
1739
|
-
<div class="method-description">
|
1740
|
-
<p>
|
1741
|
-
Read the contents of the current node, including child nodes and markup.
|
1742
|
-
</p>
|
1743
|
-
<p>
|
1744
|
-
Return a string containing the <a href="../XML.html">XML</a> content, or
|
1745
|
-
nil if the current node is neither an element nor attribute, or has no
|
1746
|
-
child nodes.
|
1747
|
-
</p>
|
1748
|
-
<p><a class="source-toggle" href="#"
|
1749
|
-
onclick="toggleCode('M000279-source');return false;">[Source]</a></p>
|
1750
|
-
<div class="method-source-code" id="M000279-source">
|
1751
|
-
<pre>
|
1752
|
-
/*
|
1753
|
-
* call-seq:
|
1754
|
-
* reader.read_inner_xml -> data
|
1755
|
-
*
|
1756
|
-
* Read the contents of the current node, including child nodes and markup.
|
1757
|
-
*
|
1758
|
-
* Return a string containing the XML content, or nil if the current node is
|
1759
|
-
* neither an element nor attribute, or has no child nodes.
|
1760
|
-
*/
|
1761
|
-
static VALUE
|
1762
|
-
ruby_xml_reader_read_inner_xml(VALUE self)
|
1763
|
-
{
|
1764
|
-
return CSTR2RVAL2(xmlTextReaderReadInnerXml(ruby_xml_text_reader_get(self)));
|
1765
|
-
}
|
1766
|
-
</pre>
|
1767
|
-
</div>
|
1768
|
-
</div>
|
1769
|
-
</div>
|
1770
|
-
|
1771
|
-
<div id="method-M000280" class="method-detail">
|
1772
|
-
<a name="M000280"></a>
|
1773
|
-
|
1774
|
-
<div class="method-heading">
|
1775
|
-
<a href="#M000280" class="method-signature">
|
1776
|
-
<span class="method-name">reader.read_outer_xml → data<br />
|
1777
|
-
</span>
|
1778
|
-
</a>
|
1779
|
-
</div>
|
1780
|
-
|
1781
|
-
<div class="method-description">
|
1782
|
-
<p>
|
1783
|
-
Read the contents of the current node, including child nodes and markup.
|
1784
|
-
</p>
|
1785
|
-
<p>
|
1786
|
-
Return a string containing the <a href="../XML.html">XML</a> content, or
|
1787
|
-
nil if the current node is neither an element nor attribute, or has no
|
1788
|
-
child nodes.
|
1789
|
-
</p>
|
1790
|
-
<p><a class="source-toggle" href="#"
|
1791
|
-
onclick="toggleCode('M000280-source');return false;">[Source]</a></p>
|
1792
|
-
<div class="method-source-code" id="M000280-source">
|
1793
|
-
<pre>
|
1794
|
-
/*
|
1795
|
-
* call-seq:
|
1796
|
-
* reader.read_outer_xml -> data
|
1797
|
-
*
|
1798
|
-
* Read the contents of the current node, including child nodes and markup.
|
1799
|
-
*
|
1800
|
-
* Return a string containing the XML content, or nil if the current node is
|
1801
|
-
* neither an element nor attribute, or has no child nodes.
|
1802
|
-
*/
|
1803
|
-
static VALUE
|
1804
|
-
ruby_xml_reader_read_outer_xml(VALUE self)
|
1805
|
-
{
|
1806
|
-
return CSTR2RVAL2(xmlTextReaderReadOuterXml(ruby_xml_text_reader_get(self)));
|
1807
|
-
}
|
1808
|
-
</pre>
|
1809
|
-
</div>
|
1810
|
-
</div>
|
1811
|
-
</div>
|
1812
|
-
|
1813
|
-
<div id="method-M000281" class="method-detail">
|
1814
|
-
<a name="M000281"></a>
|
1815
|
-
|
1816
|
-
<div class="method-heading">
|
1817
|
-
<a href="#M000281" class="method-signature">
|
1818
|
-
<span class="method-name">reader.read_state → state<br />
|
1819
|
-
</span>
|
1820
|
-
</a>
|
1821
|
-
</div>
|
1822
|
-
|
1823
|
-
<div class="method-description">
|
1824
|
-
<p>
|
1825
|
-
Get the <a href="Reader.html#M000277">read</a> state of the reader.
|
1826
|
-
</p>
|
1827
|
-
<p><a class="source-toggle" href="#"
|
1828
|
-
onclick="toggleCode('M000281-source');return false;">[Source]</a></p>
|
1829
|
-
<div class="method-source-code" id="M000281-source">
|
1830
|
-
<pre>
|
1831
|
-
/*
|
1832
|
-
* call-seq:
|
1833
|
-
* reader.read_state -> state
|
1834
|
-
*
|
1835
|
-
* Get the read state of the reader.
|
1836
|
-
*/
|
1837
|
-
static VALUE
|
1838
|
-
ruby_xml_reader_read_state(VALUE self)
|
1839
|
-
{
|
1840
|
-
return INT2FIX(xmlTextReaderReadState(ruby_xml_text_reader_get(self)));
|
1841
|
-
}
|
1842
|
-
</pre>
|
1843
|
-
</div>
|
1844
|
-
</div>
|
1845
|
-
</div>
|
1846
|
-
|
1847
|
-
<div id="method-M000282" class="method-detail">
|
1848
|
-
<a name="M000282"></a>
|
1849
|
-
|
1850
|
-
<div class="method-heading">
|
1851
|
-
<a href="#M000282" class="method-signature">
|
1852
|
-
<span class="method-name">reader.read_string → string<br />
|
1853
|
-
</span>
|
1854
|
-
</a>
|
1855
|
-
</div>
|
1856
|
-
|
1857
|
-
<div class="method-description">
|
1858
|
-
<p>
|
1859
|
-
Read the contents of an element or a text node as a string.
|
1860
|
-
</p>
|
1861
|
-
<p>
|
1862
|
-
Return a string containing the contents of the Element or Text node, or nil
|
1863
|
-
if the reader is positioned on any other type of node.
|
1864
|
-
</p>
|
1865
|
-
<p><a class="source-toggle" href="#"
|
1866
|
-
onclick="toggleCode('M000282-source');return false;">[Source]</a></p>
|
1867
|
-
<div class="method-source-code" id="M000282-source">
|
1868
|
-
<pre>
|
1869
|
-
/*
|
1870
|
-
* call-seq:
|
1871
|
-
* reader.read_string -> string
|
1872
|
-
*
|
1873
|
-
* Read the contents of an element or a text node as a string.
|
1874
|
-
*
|
1875
|
-
* Return a string containing the contents of the Element or Text node, or nil
|
1876
|
-
* if the reader is positioned on any other type of node.
|
1877
|
-
*/
|
1878
|
-
static VALUE
|
1879
|
-
ruby_xml_reader_read_string(VALUE self)
|
1880
|
-
{
|
1881
|
-
return CSTR2RVAL2(xmlTextReaderReadString(ruby_xml_text_reader_get(self)));
|
1882
|
-
}
|
1883
|
-
</pre>
|
1884
|
-
</div>
|
1885
|
-
</div>
|
1886
|
-
</div>
|
1887
|
-
|
1888
|
-
<div id="method-M000285" class="method-detail">
|
1889
|
-
<a name="M000285"></a>
|
1890
|
-
|
1891
|
-
<div class="method-heading">
|
1892
|
-
<a href="#M000285" class="method-signature">
|
1893
|
-
<span class="method-name">reader.relax_ng_validate(rng) → code<br />
|
1894
|
-
</span>
|
1895
|
-
</a>
|
1896
|
-
</div>
|
1897
|
-
|
1898
|
-
<div class="method-description">
|
1899
|
-
<p>
|
1900
|
-
Use <a href="RelaxNG.html">RelaxNG</a> to validate the document as it is
|
1901
|
-
processed. Activation is only possible before the first <a
|
1902
|
-
href="Reader.html#M000277">read</a>. If <tt>rng</tt> is nil, the <a
|
1903
|
-
href="RelaxNG.html">RelaxNG</a> validation is desactivated.
|
1904
|
-
</p>
|
1905
|
-
<p>
|
1906
|
-
Return 0 in case the <a href="RelaxNG.html">RelaxNG</a> validation could be
|
1907
|
-
(des)activated and -1 in case of error.
|
1908
|
-
</p>
|
1909
|
-
<p><a class="source-toggle" href="#"
|
1910
|
-
onclick="toggleCode('M000285-source');return false;">[Source]</a></p>
|
1911
|
-
<div class="method-source-code" id="M000285-source">
|
1912
|
-
<pre>
|
1913
|
-
/*
|
1914
|
-
* call-seq:
|
1915
|
-
* reader.relax_ng_validate(rng) -> code
|
1916
|
-
*
|
1917
|
-
* Use RelaxNG to validate the document as it is processed. Activation is only
|
1918
|
-
* possible before the first read. If +rng+ is nil, the RelaxNG validation is
|
1919
|
-
* desactivated.
|
1920
|
-
*
|
1921
|
-
* Return 0 in case the RelaxNG validation could be (des)activated and -1 in
|
1922
|
-
* case of error.
|
1923
|
-
*/
|
1924
|
-
static VALUE
|
1925
|
-
ruby_xml_reader_relax_ng_validate(VALUE self, VALUE rng)
|
1926
|
-
{
|
1927
|
-
return INT2FIX(xmlTextReaderRelaxNGValidate(ruby_xml_text_reader_get(self), NIL_P(rng) ? NULL : RVAL2CSTR(rng)));
|
1928
|
-
}
|
1929
|
-
</pre>
|
1930
|
-
</div>
|
1931
|
-
</div>
|
1932
|
-
</div>
|
1933
|
-
|
1934
|
-
<div id="method-M000284" class="method-detail">
|
1935
|
-
<a name="M000284"></a>
|
1936
|
-
|
1937
|
-
<div class="method-heading">
|
1938
|
-
<a href="#M000284" class="method-signature">
|
1939
|
-
<span class="method-name">reader.reset_error_handler<br />
|
1940
|
-
</span>
|
1941
|
-
</a>
|
1942
|
-
</div>
|
1943
|
-
|
1944
|
-
<div class="method-description">
|
1945
|
-
<p>
|
1946
|
-
Restore the default error and warning handlers.
|
1947
|
-
</p>
|
1948
|
-
<p><a class="source-toggle" href="#"
|
1949
|
-
onclick="toggleCode('M000284-source');return false;">[Source]</a></p>
|
1950
|
-
<div class="method-source-code" id="M000284-source">
|
1951
|
-
<pre>
|
1952
|
-
/*
|
1953
|
-
* call-seq:
|
1954
|
-
* reader.reset_error_handler
|
1955
|
-
*
|
1956
|
-
* Restore the default error and warning handlers.
|
1957
|
-
*/
|
1958
|
-
static VALUE
|
1959
|
-
ruby_xml_reader_reset_error_handler(VALUE self)
|
1960
|
-
{
|
1961
|
-
xmlTextReaderSetErrorHandler(ruby_xml_text_reader_get(self), NULL, NULL);
|
1962
|
-
return self;
|
1963
|
-
}
|
1964
|
-
</pre>
|
1965
|
-
</div>
|
1966
|
-
</div>
|
1967
|
-
</div>
|
1968
|
-
|
1969
|
-
<div id="method-M000286" class="method-detail">
|
1970
|
-
<a name="M000286"></a>
|
1971
|
-
|
1972
|
-
<div class="method-heading">
|
1973
|
-
<a href="#M000286" class="method-signature">
|
1974
|
-
<span class="method-name">reader.schema_validate(schema) → code<br />
|
1975
|
-
</span>
|
1976
|
-
</a>
|
1977
|
-
</div>
|
1978
|
-
|
1979
|
-
<div class="method-description">
|
1980
|
-
<p>
|
1981
|
-
Use W3C XSD schema to validate the document as it is processed. Activation
|
1982
|
-
is only possible before the first <a href="Reader.html#M000277">read</a>.
|
1983
|
-
If <tt>schema</tt> is nil, then <a href="../XML.html">XML</a> <a
|
1984
|
-
href="Schema.html">Schema</a> validation is desactivated.
|
1985
|
-
</p>
|
1986
|
-
<p>
|
1987
|
-
Return 0 in case the schemas validation could be (de)activated and -1 in
|
1988
|
-
case of error.
|
1989
|
-
</p>
|
1990
|
-
<p><a class="source-toggle" href="#"
|
1991
|
-
onclick="toggleCode('M000286-source');return false;">[Source]</a></p>
|
1992
|
-
<div class="method-source-code" id="M000286-source">
|
1993
|
-
<pre>
|
1994
|
-
/*
|
1995
|
-
* call-seq:
|
1996
|
-
* reader.schema_validate(schema) -> code
|
1997
|
-
*
|
1998
|
-
* Use W3C XSD schema to validate the document as it is processed. Activation
|
1999
|
-
* is only possible before the first read. If +schema+ is nil, then XML Schema
|
2000
|
-
* validation is desactivated.
|
2001
|
-
*
|
2002
|
-
* Return 0 in case the schemas validation could be (de)activated and -1 in
|
2003
|
-
* case of error.
|
2004
|
-
*/
|
2005
|
-
static VALUE
|
2006
|
-
ruby_xml_reader_schema_validate(VALUE self, VALUE xsd)
|
2007
|
-
{
|
2008
|
-
return INT2FIX(xmlTextReaderSchemaValidate(ruby_xml_text_reader_get(self), NIL_P(xsd) ? NULL : RVAL2CSTR(xsd)));
|
2009
|
-
}
|
2010
|
-
</pre>
|
2011
|
-
</div>
|
2012
|
-
</div>
|
2013
|
-
</div>
|
2014
|
-
|
2015
|
-
<div id="method-M000283" class="method-detail">
|
2016
|
-
<a name="M000283"></a>
|
2017
|
-
|
2018
|
-
<div class="method-heading">
|
2019
|
-
<a href="#M000283" class="method-signature">
|
2020
|
-
<span class="method-name">reader.set_error_handler { ... }<br />
|
2021
|
-
</span>
|
2022
|
-
</a>
|
2023
|
-
</div>
|
2024
|
-
|
2025
|
-
<div class="method-description">
|
2026
|
-
<p>
|
2027
|
-
Register a callback block that will be called on error and warnings. The
|
2028
|
-
block will be called with 5 parameters: the reader, the error message, the
|
2029
|
-
severity, the base URI and the line number.
|
2030
|
-
</p>
|
2031
|
-
<p><a class="source-toggle" href="#"
|
2032
|
-
onclick="toggleCode('M000283-source');return false;">[Source]</a></p>
|
2033
|
-
<div class="method-source-code" id="M000283-source">
|
2034
|
-
<pre>
|
2035
|
-
/*
|
2036
|
-
* call-seq:
|
2037
|
-
* reader.set_error_handler { ... }
|
2038
|
-
*
|
2039
|
-
* Register a callback block that will be called on error and warnings. The
|
2040
|
-
* block will be called with 5 parameters: the reader, the error message, the
|
2041
|
-
* severity, the base URI and the line number.
|
2042
|
-
*/
|
2043
|
-
static VALUE
|
2044
|
-
ruby_xml_reader_set_error_handler(VALUE self)
|
2045
|
-
{
|
2046
|
-
VALUE block;
|
2047
|
-
xmlTextReaderPtr reader;
|
2048
|
-
|
2049
|
-
if (rb_block_given_p() == Qfalse)
|
2050
|
-
rb_raise(rb_eRuntimeError, "No block given");
|
2051
|
-
|
2052
|
-
block = rb_block_proc();
|
2053
|
-
|
2054
|
-
/* Embed the block within the parser object to avoid it to be collected.
|
2055
|
-
* Previous handler if exits is overwritten.
|
2056
|
-
*/
|
2057
|
-
rb_ivar_set(self, error_handler_block_ivar_id, block);
|
2058
|
-
reader = ruby_xml_text_reader_get(self);
|
2059
|
-
xmlTextReaderSetErrorHandler(reader, __xml_reader_error_cb, (void *)self);
|
2060
|
-
|
2061
|
-
return self;
|
2062
|
-
}
|
2063
|
-
</pre>
|
2064
|
-
</div>
|
2065
|
-
</div>
|
2066
|
-
</div>
|
2067
|
-
|
2068
|
-
<div id="method-M000300" class="method-detail">
|
2069
|
-
<a name="M000300"></a>
|
2070
|
-
|
2071
|
-
<div class="method-heading">
|
2072
|
-
<a href="#M000300" class="method-signature">
|
2073
|
-
<span class="method-name">reader.standalone → code<br />
|
2074
|
-
</span>
|
2075
|
-
</a>
|
2076
|
-
</div>
|
2077
|
-
|
2078
|
-
<div class="method-description">
|
2079
|
-
<p>
|
2080
|
-
Determine the <a href="Reader.html#M000300">standalone</a> status of the
|
2081
|
-
document being <a href="Reader.html#M000277">read</a>.
|
2082
|
-
</p>
|
2083
|
-
<p>
|
2084
|
-
Return 1 if the document was declared to be <a
|
2085
|
-
href="Reader.html#M000300">standalone</a>, 0 if it was declared to be not
|
2086
|
-
<a href="Reader.html#M000300">standalone</a>, or -1 if the document did not
|
2087
|
-
specify its <a href="Reader.html#M000300">standalone</a> status or in case
|
2088
|
-
of error.
|
2089
|
-
</p>
|
2090
|
-
<p><a class="source-toggle" href="#"
|
2091
|
-
onclick="toggleCode('M000300-source');return false;">[Source]</a></p>
|
2092
|
-
<div class="method-source-code" id="M000300-source">
|
2093
|
-
<pre>
|
2094
|
-
/*
|
2095
|
-
* call-seq:
|
2096
|
-
* reader.standalone -> code
|
2097
|
-
*
|
2098
|
-
* Determine the standalone status of the document being read.
|
2099
|
-
*
|
2100
|
-
* Return 1 if the document was declared to be standalone, 0 if it was
|
2101
|
-
* declared to be not standalone, or -1 if the document did not specify its
|
2102
|
-
* standalone status or in case of error.
|
2103
|
-
*/
|
2104
|
-
static VALUE
|
2105
|
-
ruby_xml_reader_standalone(VALUE self)
|
2106
|
-
{
|
2107
|
-
return INT2FIX(xmlTextReaderStandalone(ruby_xml_text_reader_get(self)));
|
2108
|
-
}
|
2109
|
-
</pre>
|
2110
|
-
</div>
|
2111
|
-
</div>
|
2112
|
-
</div>
|
2113
|
-
|
2114
|
-
<div id="method-M000313" class="method-detail">
|
2115
|
-
<a name="M000313"></a>
|
2116
|
-
|
2117
|
-
<div class="method-heading">
|
2118
|
-
<a href="#M000313" class="method-signature">
|
2119
|
-
<span class="method-name">reader.valid? → bool<br />
|
2120
|
-
</span>
|
2121
|
-
</a>
|
2122
|
-
</div>
|
2123
|
-
|
2124
|
-
<div class="method-description">
|
2125
|
-
<p>
|
2126
|
-
Retrieve the validity status from the parser context.
|
2127
|
-
</p>
|
2128
|
-
<p><a class="source-toggle" href="#"
|
2129
|
-
onclick="toggleCode('M000313-source');return false;">[Source]</a></p>
|
2130
|
-
<div class="method-source-code" id="M000313-source">
|
2131
|
-
<pre>
|
2132
|
-
/*
|
2133
|
-
* call-seq:
|
2134
|
-
* reader.valid? -> bool
|
2135
|
-
*
|
2136
|
-
* Retrieve the validity status from the parser context.
|
2137
|
-
*/
|
2138
|
-
static VALUE
|
2139
|
-
ruby_xml_reader_valid(VALUE self)
|
2140
|
-
{
|
2141
|
-
return xmlTextReaderIsValid(ruby_xml_text_reader_get(self)) ? Qtrue : Qfalse;
|
2142
|
-
}
|
2143
|
-
</pre>
|
2144
|
-
</div>
|
2145
|
-
</div>
|
2146
|
-
</div>
|
2147
|
-
|
2148
|
-
<div id="method-M000304" class="method-detail">
|
2149
|
-
<a name="M000304"></a>
|
2150
|
-
|
2151
|
-
<div class="method-heading">
|
2152
|
-
<a href="#M000304" class="method-signature">
|
2153
|
-
<span class="method-name">reader.value → text<br />
|
2154
|
-
</span>
|
2155
|
-
</a>
|
2156
|
-
</div>
|
2157
|
-
|
2158
|
-
<div class="method-description">
|
2159
|
-
<p>
|
2160
|
-
Provide the text <a href="Reader.html#M000304">value</a> of the node if
|
2161
|
-
present.
|
2162
|
-
</p>
|
2163
|
-
<p><a class="source-toggle" href="#"
|
2164
|
-
onclick="toggleCode('M000304-source');return false;">[Source]</a></p>
|
2165
|
-
<div class="method-source-code" id="M000304-source">
|
2166
|
-
<pre>
|
2167
|
-
/*
|
2168
|
-
* call-seq:
|
2169
|
-
* reader.value -> text
|
2170
|
-
*
|
2171
|
-
* Provide the text value of the node if present.
|
2172
|
-
*/
|
2173
|
-
static VALUE
|
2174
|
-
ruby_xml_reader_value(VALUE self)
|
2175
|
-
{
|
2176
|
-
return CSTR2RVAL(xmlTextReaderConstValue(ruby_xml_text_reader_get(self)));
|
2177
|
-
}
|
2178
|
-
</pre>
|
2179
|
-
</div>
|
2180
|
-
</div>
|
2181
|
-
</div>
|
2182
|
-
|
2183
|
-
<div id="method-M000295" class="method-detail">
|
2184
|
-
<a name="M000295"></a>
|
2185
|
-
|
2186
|
-
<div class="method-heading">
|
2187
|
-
<a href="#M000295" class="method-signature">
|
2188
|
-
<span class="method-name">reader.xml_lang → value<br />
|
2189
|
-
</span>
|
2190
|
-
</a>
|
2191
|
-
</div>
|
2192
|
-
|
2193
|
-
<div class="method-description">
|
2194
|
-
<p>
|
2195
|
-
Get the xml:lang scope within which the node resides.
|
2196
|
-
</p>
|
2197
|
-
<p><a class="source-toggle" href="#"
|
2198
|
-
onclick="toggleCode('M000295-source');return false;">[Source]</a></p>
|
2199
|
-
<div class="method-source-code" id="M000295-source">
|
2200
|
-
<pre>
|
2201
|
-
/*
|
2202
|
-
* call-seq:
|
2203
|
-
* reader.xml_lang -> value
|
2204
|
-
*
|
2205
|
-
* Get the xml:lang scope within which the node resides.
|
2206
|
-
*/
|
2207
|
-
static VALUE
|
2208
|
-
ruby_xml_reader_xml_lang(VALUE self)
|
2209
|
-
{
|
2210
|
-
return CSTR2RVAL(xmlTextReaderConstXmlLang(ruby_xml_text_reader_get(self)));
|
2211
|
-
}
|
2212
|
-
</pre>
|
2213
|
-
</div>
|
2214
|
-
</div>
|
2215
|
-
</div>
|
2216
|
-
|
2217
|
-
<div id="method-M000296" class="method-detail">
|
2218
|
-
<a name="M000296"></a>
|
2219
|
-
|
2220
|
-
<div class="method-heading">
|
2221
|
-
<a href="#M000296" class="method-signature">
|
2222
|
-
<span class="method-name">reader.xml_version → version<br />
|
2223
|
-
</span>
|
2224
|
-
</a>
|
2225
|
-
</div>
|
2226
|
-
|
2227
|
-
<div class="method-description">
|
2228
|
-
<p>
|
2229
|
-
Determine the <a href="../XML.html">XML</a> version of the document being
|
2230
|
-
<a href="Reader.html#M000277">read</a>.
|
2231
|
-
</p>
|
2232
|
-
<p><a class="source-toggle" href="#"
|
2233
|
-
onclick="toggleCode('M000296-source');return false;">[Source]</a></p>
|
2234
|
-
<div class="method-source-code" id="M000296-source">
|
2235
|
-
<pre>
|
2236
|
-
/*
|
2237
|
-
* call-seq:
|
2238
|
-
* reader.xml_version -> version
|
2239
|
-
*
|
2240
|
-
* Determine the XML version of the document being read.
|
2241
|
-
*/
|
2242
|
-
static VALUE
|
2243
|
-
ruby_xml_reader_xml_version(VALUE self)
|
2244
|
-
{
|
2245
|
-
return CSTR2RVAL(xmlTextReaderConstXmlVersion(ruby_xml_text_reader_get(self)));
|
2246
|
-
}
|
2247
|
-
</pre>
|
2248
|
-
</div>
|
2249
|
-
</div>
|
2250
|
-
</div>
|
2251
|
-
|
2252
|
-
|
2253
|
-
</div>
|
2254
|
-
|
2255
|
-
|
2256
|
-
</div>
|
2257
|
-
|
2258
|
-
|
2259
|
-
<div id="validator-badges">
|
2260
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
2261
|
-
</div>
|
2262
|
-
|
2263
|
-
</body>
|
2264
|
-
</html>
|