coupa-libxml-ruby 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +488 -0
- data/LICENSE +22 -0
- data/README +161 -0
- data/Rakefile +188 -0
- data/doc/css/normal.css +182 -0
- data/doc/img/raze-tiny.png +0 -0
- data/doc/img/red-cube.jpg +0 -0
- data/doc/img/xml-ruby.png +0 -0
- data/doc/index.xml +43 -0
- data/doc/install.xml +77 -0
- data/doc/layout.rhtml +38 -0
- data/doc/layout.xsl +67 -0
- data/doc/license.xml +32 -0
- data/doc/log/changelog.xml +1324 -0
- data/doc/log/changelog.xsl +42 -0
- data/doc/rdoc/classes/LibXML.html +207 -0
- data/doc/rdoc/classes/LibXML/XML.html +407 -0
- data/doc/rdoc/classes/LibXML/XML/Attr.html +521 -0
- data/doc/rdoc/classes/LibXML/XML/AttrDecl.html +360 -0
- data/doc/rdoc/classes/LibXML/XML/Attributes.html +149 -0
- data/doc/rdoc/classes/LibXML/XML/Document.html +460 -0
- data/doc/rdoc/classes/LibXML/XML/Error.html +129 -0
- data/doc/rdoc/classes/LibXML/XML/HTMLParser.html +263 -0
- data/doc/rdoc/classes/LibXML/XML/Namespace.html +248 -0
- data/doc/rdoc/classes/LibXML/XML/Namespaces.html +200 -0
- data/doc/rdoc/classes/LibXML/XML/Node.html +1351 -0
- data/doc/rdoc/classes/LibXML/XML/Parser.html +328 -0
- data/doc/rdoc/classes/LibXML/XML/Reader.html +172 -0
- data/doc/rdoc/classes/LibXML/XML/SaxParser.html +232 -0
- data/doc/rdoc/classes/LibXML/XML/SaxParser/Callbacks.html +506 -0
- data/doc/rdoc/classes/LibXML/XML/SaxParser/VerboseCallbacks.html +555 -0
- data/doc/rdoc/classes/LibXML/XML/XPath.html +111 -0
- data/doc/rdoc/classes/LibXML/XML/XPath/Object.html +162 -0
- data/doc/rdoc/classes/cXMLDtd.html +114 -0
- data/doc/rdoc/classes/cXMLNode.html +114 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/CHANGES.html +794 -0
- data/doc/rdoc/files/LICENSE.html +131 -0
- data/doc/rdoc/files/README.html +343 -0
- data/doc/rdoc/files/ext/libxml/libxml_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_attr_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_attr_decl_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_attributes_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_cbg_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_document_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_dtd_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_encoding_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_error_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_context_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_options_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_input_cbg_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_io_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_namespace_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_namespaces_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_node_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_context_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_options_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_reader_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_relaxng_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_sax2_handler_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_sax_parser_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_schema_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xinclude_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_context_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_expression_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_object_c.html +101 -0
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_c.html +101 -0
- data/doc/rdoc/files/lib/libxml/attr_decl_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/attr_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/attributes_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/document_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/error_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/hpricot_rb.html +192 -0
- data/doc/rdoc/files/lib/libxml/html_parser_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/namespace_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/namespaces_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/node_rb.html +108 -0
- data/doc/rdoc/files/lib/libxml/ns_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/parser_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/properties_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/reader_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/sax_callbacks_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/sax_parser_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/tree_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml/xpath_object_rb.html +101 -0
- data/doc/rdoc/files/lib/libxml_rb.html +133 -0
- data/doc/rdoc/files/lib/xml/libxml_rb.html +124 -0
- data/doc/rdoc/files/lib/xml_rb.html +134 -0
- data/doc/rdoc/fr_class_index.html +46 -0
- data/doc/rdoc/fr_file_index.html +84 -0
- data/doc/rdoc/fr_method_index.html +155 -0
- data/doc/rdoc/index.html +24 -0
- data/doc/rdoc/rdoc-style.css +208 -0
- data/ext/libxml/Makefile +157 -0
- data/ext/libxml/build.log +4 -0
- data/ext/libxml/extconf.h +5 -0
- data/ext/libxml/extconf.rb +278 -0
- data/ext/libxml/libxml.c +77 -0
- data/ext/libxml/libxml.o +0 -0
- data/ext/libxml/libxml_ruby.bundle +0 -0
- data/ext/libxml/mkmf.log +228 -0
- data/ext/libxml/ruby_libxml.h +93 -0
- data/ext/libxml/ruby_xml.c +893 -0
- data/ext/libxml/ruby_xml.h +10 -0
- data/ext/libxml/ruby_xml.o +0 -0
- data/ext/libxml/ruby_xml_attr.c +352 -0
- data/ext/libxml/ruby_xml_attr.h +14 -0
- data/ext/libxml/ruby_xml_attr.o +0 -0
- data/ext/libxml/ruby_xml_attr_decl.c +171 -0
- data/ext/libxml/ruby_xml_attr_decl.h +13 -0
- data/ext/libxml/ruby_xml_attr_decl.o +0 -0
- data/ext/libxml/ruby_xml_attributes.c +277 -0
- data/ext/libxml/ruby_xml_attributes.h +17 -0
- data/ext/libxml/ruby_xml_attributes.o +0 -0
- data/ext/libxml/ruby_xml_cbg.c +86 -0
- data/ext/libxml/ruby_xml_cbg.o +0 -0
- data/ext/libxml/ruby_xml_document.c +1006 -0
- data/ext/libxml/ruby_xml_document.c.old +936 -0
- data/ext/libxml/ruby_xml_document.h +17 -0
- data/ext/libxml/ruby_xml_document.o +0 -0
- data/ext/libxml/ruby_xml_dtd.c +257 -0
- data/ext/libxml/ruby_xml_dtd.h +9 -0
- data/ext/libxml/ruby_xml_dtd.o +0 -0
- data/ext/libxml/ruby_xml_encoding.c +134 -0
- data/ext/libxml/ruby_xml_encoding.h +12 -0
- data/ext/libxml/ruby_xml_encoding.o +0 -0
- data/ext/libxml/ruby_xml_error.c +1004 -0
- data/ext/libxml/ruby_xml_error.h +14 -0
- data/ext/libxml/ruby_xml_error.o +0 -0
- data/ext/libxml/ruby_xml_html_parser.c +92 -0
- data/ext/libxml/ruby_xml_html_parser.h +12 -0
- data/ext/libxml/ruby_xml_html_parser.o +0 -0
- data/ext/libxml/ruby_xml_html_parser_context.c +308 -0
- data/ext/libxml/ruby_xml_html_parser_context.h +12 -0
- data/ext/libxml/ruby_xml_html_parser_context.o +0 -0
- data/ext/libxml/ruby_xml_html_parser_options.c +40 -0
- data/ext/libxml/ruby_xml_html_parser_options.h +12 -0
- data/ext/libxml/ruby_xml_html_parser_options.o +0 -0
- data/ext/libxml/ruby_xml_input_cbg.c +191 -0
- data/ext/libxml/ruby_xml_input_cbg.h +20 -0
- data/ext/libxml/ruby_xml_input_cbg.o +0 -0
- data/ext/libxml/ruby_xml_io.c +30 -0
- data/ext/libxml/ruby_xml_io.h +9 -0
- data/ext/libxml/ruby_xml_io.o +0 -0
- data/ext/libxml/ruby_xml_namespace.c +170 -0
- data/ext/libxml/ruby_xml_namespace.h +12 -0
- data/ext/libxml/ruby_xml_namespace.o +0 -0
- data/ext/libxml/ruby_xml_namespaces.c +295 -0
- data/ext/libxml/ruby_xml_namespaces.h +11 -0
- data/ext/libxml/ruby_xml_namespaces.o +0 -0
- data/ext/libxml/ruby_xml_node.c +1386 -0
- data/ext/libxml/ruby_xml_node.h +13 -0
- data/ext/libxml/ruby_xml_node.o +0 -0
- data/ext/libxml/ruby_xml_parser.c +94 -0
- data/ext/libxml/ruby_xml_parser.h +14 -0
- data/ext/libxml/ruby_xml_parser.o +0 -0
- data/ext/libxml/ruby_xml_parser_context.c +982 -0
- data/ext/libxml/ruby_xml_parser_context.h +12 -0
- data/ext/libxml/ruby_xml_parser_context.o +0 -0
- data/ext/libxml/ruby_xml_parser_options.c +68 -0
- data/ext/libxml/ruby_xml_parser_options.h +14 -0
- data/ext/libxml/ruby_xml_parser_options.o +0 -0
- data/ext/libxml/ruby_xml_reader.c +1002 -0
- data/ext/libxml/ruby_xml_reader.h +14 -0
- data/ext/libxml/ruby_xml_reader.o +0 -0
- data/ext/libxml/ruby_xml_relaxng.c +111 -0
- data/ext/libxml/ruby_xml_relaxng.h +10 -0
- data/ext/libxml/ruby_xml_relaxng.o +0 -0
- data/ext/libxml/ruby_xml_sax2_handler.c +322 -0
- data/ext/libxml/ruby_xml_sax2_handler.h +12 -0
- data/ext/libxml/ruby_xml_sax2_handler.o +0 -0
- data/ext/libxml/ruby_xml_sax_parser.c +137 -0
- data/ext/libxml/ruby_xml_sax_parser.h +12 -0
- data/ext/libxml/ruby_xml_sax_parser.o +0 -0
- data/ext/libxml/ruby_xml_schema.c +159 -0
- data/ext/libxml/ruby_xml_schema.h +11 -0
- data/ext/libxml/ruby_xml_schema.o +0 -0
- data/ext/libxml/ruby_xml_version.h +9 -0
- data/ext/libxml/ruby_xml_xinclude.c +18 -0
- data/ext/libxml/ruby_xml_xinclude.h +13 -0
- data/ext/libxml/ruby_xml_xinclude.o +0 -0
- data/ext/libxml/ruby_xml_xpath.c +107 -0
- data/ext/libxml/ruby_xml_xpath.h +12 -0
- data/ext/libxml/ruby_xml_xpath.o +0 -0
- data/ext/libxml/ruby_xml_xpath_context.c +387 -0
- data/ext/libxml/ruby_xml_xpath_context.h +11 -0
- data/ext/libxml/ruby_xml_xpath_context.o +0 -0
- data/ext/libxml/ruby_xml_xpath_expression.c +83 -0
- data/ext/libxml/ruby_xml_xpath_expression.h +12 -0
- data/ext/libxml/ruby_xml_xpath_expression.o +0 -0
- data/ext/libxml/ruby_xml_xpath_object.c +336 -0
- data/ext/libxml/ruby_xml_xpath_object.h +19 -0
- data/ext/libxml/ruby_xml_xpath_object.o +0 -0
- data/ext/libxml/ruby_xml_xpointer.c +101 -0
- data/ext/libxml/ruby_xml_xpointer.h +13 -0
- data/ext/libxml/ruby_xml_xpointer.o +0 -0
- data/ext/mingw/Rakefile +34 -0
- data/ext/mingw/build.rake +41 -0
- data/ext/vc/libxml_ruby.sln +26 -0
- data/lib/libxml.rb +30 -0
- data/lib/libxml/attr.rb +111 -0
- data/lib/libxml/attr_decl.rb +78 -0
- data/lib/libxml/attributes.rb +12 -0
- data/lib/libxml/document.rb +190 -0
- data/lib/libxml/error.rb +88 -0
- data/lib/libxml/hpricot.rb +76 -0
- data/lib/libxml/html_parser.rb +94 -0
- data/lib/libxml/namespace.rb +60 -0
- data/lib/libxml/namespaces.rb +36 -0
- data/lib/libxml/node.rb +385 -0
- data/lib/libxml/ns.rb +20 -0
- data/lib/libxml/parser.rb +365 -0
- data/lib/libxml/properties.rb +21 -0
- data/lib/libxml/reader.rb +27 -0
- data/lib/libxml/sax_callbacks.rb +178 -0
- data/lib/libxml/sax_parser.rb +56 -0
- data/lib/libxml/tree.rb +27 -0
- data/lib/libxml/xpath_object.rb +14 -0
- data/lib/xml.rb +14 -0
- data/lib/xml/libxml.rb +8 -0
- data/setup.rb +1585 -0
- data/test/etc_doc_to_s.rb +19 -0
- data/test/ets_doc_file.rb +15 -0
- data/test/ets_doc_to_s.rb +21 -0
- data/test/ets_gpx.rb +26 -0
- data/test/ets_node_gc.rb +21 -0
- data/test/ets_test.xml +2 -0
- data/test/ets_tsr.rb +9 -0
- data/test/model/atom.xml +13 -0
- data/test/model/bands.xml +5 -0
- data/test/model/books.xml +146 -0
- data/test/model/merge_bug_data.xml +58 -0
- data/test/model/ruby-lang.html +238 -0
- data/test/model/rubynet.xml +79 -0
- data/test/model/rubynet_project +1 -0
- data/test/model/shiporder.rnc +28 -0
- data/test/model/shiporder.rng +86 -0
- data/test/model/shiporder.xml +23 -0
- data/test/model/shiporder.xsd +31 -0
- data/test/model/soap.xml +27 -0
- data/test/model/xinclude.xml +5 -0
- data/test/tc_attr.rb +170 -0
- data/test/tc_attr_decl.rb +131 -0
- data/test/tc_attributes.rb +133 -0
- data/test/tc_deprecated_require.rb +11 -0
- data/test/tc_document.rb +113 -0
- data/test/tc_document_write.rb +118 -0
- data/test/tc_dtd.rb +123 -0
- data/test/tc_error.rb +136 -0
- data/test/tc_html_parser.rb +138 -0
- data/test/tc_namespace.rb +59 -0
- data/test/tc_namespaces.rb +174 -0
- data/test/tc_node.rb +181 -0
- data/test/tc_node_cdata.rb +49 -0
- data/test/tc_node_comment.rb +30 -0
- data/test/tc_node_copy.rb +40 -0
- data/test/tc_node_edit.rb +158 -0
- data/test/tc_node_text.rb +69 -0
- data/test/tc_node_write.rb +83 -0
- data/test/tc_node_xlink.rb +26 -0
- data/test/tc_parser.rb +330 -0
- data/test/tc_parser_context.rb +186 -0
- data/test/tc_properties.rb +36 -0
- data/test/tc_reader.rb +284 -0
- data/test/tc_relaxng.rb +51 -0
- data/test/tc_sax_parser.rb +274 -0
- data/test/tc_schema.rb +51 -0
- data/test/tc_traversal.rb +220 -0
- data/test/tc_xinclude.rb +19 -0
- data/test/tc_xml.rb +224 -0
- data/test/tc_xpath.rb +193 -0
- data/test/tc_xpath_context.rb +78 -0
- data/test/tc_xpath_expression.rb +35 -0
- data/test/tc_xpointer.rb +72 -0
- data/test/test_suite.rb +33 -0
- metadata +376 -0
@@ -0,0 +1,200 @@
|
|
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::Namespaces</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::Namespaces</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/libxml/namespaces_rb.html">
|
59
|
+
lib/libxml/namespaces.rb
|
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
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000059">default</a>
|
90
|
+
<a href="#M000060">default_prefix=</a>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
|
97
|
+
<!-- if includes -->
|
98
|
+
|
99
|
+
<div id="section">
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<!-- if method_list -->
|
109
|
+
<div id="methods">
|
110
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
111
|
+
|
112
|
+
<div id="method-M000059" class="method-detail">
|
113
|
+
<a name="M000059"></a>
|
114
|
+
|
115
|
+
<div class="method-heading">
|
116
|
+
<a href="#M000059" class="method-signature">
|
117
|
+
<span class="method-name">namespace.default → XML::Namespace<br />
|
118
|
+
</span>
|
119
|
+
</a>
|
120
|
+
</div>
|
121
|
+
|
122
|
+
<div class="method-description">
|
123
|
+
<p>
|
124
|
+
Returns the <a href="Namespaces.html#M000059">default</a> namespace for
|
125
|
+
this node or nil.
|
126
|
+
</p>
|
127
|
+
<p>
|
128
|
+
Usage:
|
129
|
+
</p>
|
130
|
+
<pre>
|
131
|
+
doc = XML::Document.string('<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"/>')
|
132
|
+
ns = doc.root.namespaces.default_namespace
|
133
|
+
assert_equal(ns.href, 'http://schemas.xmlsoap.org/soap/envelope/')
|
134
|
+
</pre>
|
135
|
+
<p><a class="source-toggle" href="#"
|
136
|
+
onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
|
137
|
+
<div class="method-source-code" id="M000059-source">
|
138
|
+
<pre>
|
139
|
+
<span class="ruby-comment cmt"># File lib/libxml/namespaces.rb, line 13</span>
|
140
|
+
13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default</span>
|
141
|
+
14: <span class="ruby-identifier">find_by_prefix</span>(<span class="ruby-keyword kw">nil</span>)
|
142
|
+
15: <span class="ruby-keyword kw">end</span>
|
143
|
+
</pre>
|
144
|
+
</div>
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
<div id="method-M000060" class="method-detail">
|
149
|
+
<a name="M000060"></a>
|
150
|
+
|
151
|
+
<div class="method-heading">
|
152
|
+
<a href="#M000060" class="method-signature">
|
153
|
+
<span class="method-name">namespace.default_prefix = "string"<br />
|
154
|
+
</span>
|
155
|
+
</a>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<div class="method-description">
|
159
|
+
<p>
|
160
|
+
Assigns a name (prefix) to the <a
|
161
|
+
href="Namespaces.html#M000059">default</a> namespace. This makes it much
|
162
|
+
easier to perform <a href="XPath.html">XML::XPath</a> searches.
|
163
|
+
</p>
|
164
|
+
<p>
|
165
|
+
Usage:
|
166
|
+
</p>
|
167
|
+
<pre>
|
168
|
+
doc = XML::Document.string('<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"/>')
|
169
|
+
doc.root.namespaces.default_prefix = 'soap'
|
170
|
+
node = doc.root.find_first('soap:Envelope')
|
171
|
+
</pre>
|
172
|
+
<p><a class="source-toggle" href="#"
|
173
|
+
onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
|
174
|
+
<div class="method-source-code" id="M000060-source">
|
175
|
+
<pre>
|
176
|
+
<span class="ruby-comment cmt"># File lib/libxml/namespaces.rb, line 28</span>
|
177
|
+
28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_prefix=</span>(<span class="ruby-identifier">prefix</span>)
|
178
|
+
29: <span class="ruby-comment cmt"># Find default prefix</span>
|
179
|
+
30: <span class="ruby-identifier">ns</span> = <span class="ruby-identifier">find_by_prefix</span>(<span class="ruby-keyword kw">nil</span>)
|
180
|
+
31: <span class="ruby-identifier">raise</span>(<span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"No default namespace was found"</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">ns</span>
|
181
|
+
32: <span class="ruby-constant">Namespace</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">node</span>, <span class="ruby-identifier">prefix</span>, <span class="ruby-identifier">ns</span>.<span class="ruby-identifier">href</span>)
|
182
|
+
33: <span class="ruby-keyword kw">end</span>
|
183
|
+
</pre>
|
184
|
+
</div>
|
185
|
+
</div>
|
186
|
+
</div>
|
187
|
+
|
188
|
+
|
189
|
+
</div>
|
190
|
+
|
191
|
+
|
192
|
+
</div>
|
193
|
+
|
194
|
+
|
195
|
+
<div id="validator-badges">
|
196
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
197
|
+
</div>
|
198
|
+
|
199
|
+
</body>
|
200
|
+
</html>
|
@@ -0,0 +1,1351 @@
|
|
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::Node</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::Node</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../files/lib/libxml/node_rb.html">
|
59
|
+
lib/libxml/node.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../../../files/lib/libxml/properties_rb.html">
|
63
|
+
lib/libxml/properties.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
</td>
|
67
|
+
</tr>
|
68
|
+
|
69
|
+
<tr class="top-aligned-row">
|
70
|
+
<td><strong>Parent:</strong></td>
|
71
|
+
<td>
|
72
|
+
Object
|
73
|
+
</td>
|
74
|
+
</tr>
|
75
|
+
</table>
|
76
|
+
</div>
|
77
|
+
<!-- banner header -->
|
78
|
+
|
79
|
+
<div id="bodyContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
<div id="contextContent">
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
<div id="method-list">
|
90
|
+
<h3 class="section-bar">Methods</h3>
|
91
|
+
|
92
|
+
<div class="name-list">
|
93
|
+
<a href="#M000034">attribute?</a>
|
94
|
+
<a href="#M000035">attribute_decl?</a>
|
95
|
+
<a href="#M000017">attributes?</a>
|
96
|
+
<a href="#M000036">cdata?</a>
|
97
|
+
<a href="#M000054">child?</a>
|
98
|
+
<a href="#M000029">children</a>
|
99
|
+
<a href="#M000055">children?</a>
|
100
|
+
<a href="#M000018">clone</a>
|
101
|
+
<a href="#M000037">comment?</a>
|
102
|
+
<a href="#M000021">context</a>
|
103
|
+
<a href="#M000038">docbook_doc?</a>
|
104
|
+
<a href="#M000039">doctype?</a>
|
105
|
+
<a href="#M000040">document?</a>
|
106
|
+
<a href="#M000041">dtd?</a>
|
107
|
+
<a href="#M000020">dup</a>
|
108
|
+
<a href="#M000025">each_attr</a>
|
109
|
+
<a href="#M000026">each_element</a>
|
110
|
+
<a href="#M000042">element?</a>
|
111
|
+
<a href="#M000044">element_decl?</a>
|
112
|
+
<a href="#M000043">entity?</a>
|
113
|
+
<a href="#M000045">entity_ref?</a>
|
114
|
+
<a href="#M000022">find</a>
|
115
|
+
<a href="#M000023">find_first</a>
|
116
|
+
<a href="#M000028">first?</a>
|
117
|
+
<a href="#M000046">fragment?</a>
|
118
|
+
<a href="#M000047">html_doc?</a>
|
119
|
+
<a href="#M000019">inner_xml</a>
|
120
|
+
<a href="#M000032">last?</a>
|
121
|
+
<a href="#M000048">namespace?</a>
|
122
|
+
<a href="#M000024">namespaces</a>
|
123
|
+
<a href="#M000030">next?</a>
|
124
|
+
<a href="#M000033">node_type_name</a>
|
125
|
+
<a href="#M000049">notation?</a>
|
126
|
+
<a href="#M000027">parent?</a>
|
127
|
+
<a href="#M000050">pi?</a>
|
128
|
+
<a href="#M000031">prev?</a>
|
129
|
+
<a href="#M000057">properties</a>
|
130
|
+
<a href="#M000058">properties?</a>
|
131
|
+
<a href="#M000056">property</a>
|
132
|
+
<a href="#M000051">text?</a>
|
133
|
+
<a href="#M000052">xinclude_end?</a>
|
134
|
+
<a href="#M000053">xinclude_start?</a>
|
135
|
+
</div>
|
136
|
+
</div>
|
137
|
+
|
138
|
+
</div>
|
139
|
+
|
140
|
+
|
141
|
+
<!-- if includes -->
|
142
|
+
|
143
|
+
<div id="section">
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<div id="aliases-list">
|
148
|
+
<h3 class="section-bar">External Aliases</h3>
|
149
|
+
|
150
|
+
<div class="name-list">
|
151
|
+
<table summary="aliases">
|
152
|
+
<tr class="top-aligned-row context-row">
|
153
|
+
<td class="context-item-name">first</td>
|
154
|
+
<td>-></td>
|
155
|
+
<td class="context-item-value">child</td>
|
156
|
+
</tr>
|
157
|
+
<tr class="top-aligned-row context-row">
|
158
|
+
<td class="context-item-name">each</td>
|
159
|
+
<td>-></td>
|
160
|
+
<td class="context-item-value">each_child</td>
|
161
|
+
</tr>
|
162
|
+
</table>
|
163
|
+
</div>
|
164
|
+
</div>
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
<!-- if method_list -->
|
171
|
+
<div id="methods">
|
172
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
173
|
+
|
174
|
+
<div id="method-M000034" class="method-detail">
|
175
|
+
<a name="M000034"></a>
|
176
|
+
|
177
|
+
<div class="method-heading">
|
178
|
+
<a href="#M000034" class="method-signature">
|
179
|
+
<span class="method-name">attribute?</span><span class="method-args">()</span>
|
180
|
+
</a>
|
181
|
+
</div>
|
182
|
+
|
183
|
+
<div class="method-description">
|
184
|
+
<p>
|
185
|
+
Specifies if this is an attribute node
|
186
|
+
</p>
|
187
|
+
<p><a class="source-toggle" href="#"
|
188
|
+
onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
|
189
|
+
<div class="method-source-code" id="M000034-source">
|
190
|
+
<pre>
|
191
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 203</span>
|
192
|
+
203: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attribute?</span>
|
193
|
+
204: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ATTRIBUTE_NODE</span>
|
194
|
+
205: <span class="ruby-keyword kw">end</span>
|
195
|
+
</pre>
|
196
|
+
</div>
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
<div id="method-M000035" class="method-detail">
|
201
|
+
<a name="M000035"></a>
|
202
|
+
|
203
|
+
<div class="method-heading">
|
204
|
+
<a href="#M000035" class="method-signature">
|
205
|
+
<span class="method-name">attribute_decl?</span><span class="method-args">()</span>
|
206
|
+
</a>
|
207
|
+
</div>
|
208
|
+
|
209
|
+
<div class="method-description">
|
210
|
+
<p>
|
211
|
+
Specifies if this is an attribute declaration node
|
212
|
+
</p>
|
213
|
+
<p><a class="source-toggle" href="#"
|
214
|
+
onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
|
215
|
+
<div class="method-source-code" id="M000035-source">
|
216
|
+
<pre>
|
217
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 208</span>
|
218
|
+
208: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attribute_decl?</span>
|
219
|
+
209: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ATTRIBUTE_DECL</span>
|
220
|
+
210: <span class="ruby-keyword kw">end</span>
|
221
|
+
</pre>
|
222
|
+
</div>
|
223
|
+
</div>
|
224
|
+
</div>
|
225
|
+
|
226
|
+
<div id="method-M000017" class="method-detail">
|
227
|
+
<a name="M000017"></a>
|
228
|
+
|
229
|
+
<div class="method-heading">
|
230
|
+
<a href="#M000017" class="method-signature">
|
231
|
+
<span class="method-name">attributes?</span><span class="method-args">()</span>
|
232
|
+
</a>
|
233
|
+
</div>
|
234
|
+
|
235
|
+
<div class="method-description">
|
236
|
+
<p>
|
237
|
+
Determines whether this node has attributes
|
238
|
+
</p>
|
239
|
+
<p><a class="source-toggle" href="#"
|
240
|
+
onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
|
241
|
+
<div class="method-source-code" id="M000017-source">
|
242
|
+
<pre>
|
243
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 7</span>
|
244
|
+
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attributes?</span>
|
245
|
+
8: <span class="ruby-identifier">attributes</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
246
|
+
9: <span class="ruby-keyword kw">end</span>
|
247
|
+
</pre>
|
248
|
+
</div>
|
249
|
+
</div>
|
250
|
+
</div>
|
251
|
+
|
252
|
+
<div id="method-M000036" class="method-detail">
|
253
|
+
<a name="M000036"></a>
|
254
|
+
|
255
|
+
<div class="method-heading">
|
256
|
+
<a href="#M000036" class="method-signature">
|
257
|
+
<span class="method-name">cdata?</span><span class="method-args">()</span>
|
258
|
+
</a>
|
259
|
+
</div>
|
260
|
+
|
261
|
+
<div class="method-description">
|
262
|
+
<p>
|
263
|
+
Specifies if this is an CDATA node
|
264
|
+
</p>
|
265
|
+
<p><a class="source-toggle" href="#"
|
266
|
+
onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
|
267
|
+
<div class="method-source-code" id="M000036-source">
|
268
|
+
<pre>
|
269
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 213</span>
|
270
|
+
213: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cdata?</span>
|
271
|
+
214: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">CDATA_SECTION_NODE</span>
|
272
|
+
215: <span class="ruby-keyword kw">end</span>
|
273
|
+
</pre>
|
274
|
+
</div>
|
275
|
+
</div>
|
276
|
+
</div>
|
277
|
+
|
278
|
+
<div id="method-M000054" class="method-detail">
|
279
|
+
<a name="M000054"></a>
|
280
|
+
|
281
|
+
<div class="method-heading">
|
282
|
+
<span class="method-name">child?</span><span class="method-args">()</span>
|
283
|
+
</div>
|
284
|
+
|
285
|
+
<div class="method-description">
|
286
|
+
<p>
|
287
|
+
Alias for first?
|
288
|
+
</p>
|
289
|
+
</div>
|
290
|
+
</div>
|
291
|
+
|
292
|
+
<div id="method-M000029" class="method-detail">
|
293
|
+
<a name="M000029"></a>
|
294
|
+
|
295
|
+
<div class="method-heading">
|
296
|
+
<a href="#M000029" class="method-signature">
|
297
|
+
<span class="method-name">children</span><span class="method-args">()</span>
|
298
|
+
</a>
|
299
|
+
</div>
|
300
|
+
|
301
|
+
<div class="method-description">
|
302
|
+
<p>
|
303
|
+
Returns this node‘s <a href="Node.html#M000029">children</a> as an
|
304
|
+
array.
|
305
|
+
</p>
|
306
|
+
<p><a class="source-toggle" href="#"
|
307
|
+
onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
|
308
|
+
<div class="method-source-code" id="M000029-source">
|
309
|
+
<pre>
|
310
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 127</span>
|
311
|
+
127: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">children</span>
|
312
|
+
128: <span class="ruby-identifier">entries</span>
|
313
|
+
129: <span class="ruby-keyword kw">end</span>
|
314
|
+
</pre>
|
315
|
+
</div>
|
316
|
+
</div>
|
317
|
+
</div>
|
318
|
+
|
319
|
+
<div id="method-M000055" class="method-detail">
|
320
|
+
<a name="M000055"></a>
|
321
|
+
|
322
|
+
<div class="method-heading">
|
323
|
+
<span class="method-name">children?</span><span class="method-args">()</span>
|
324
|
+
</div>
|
325
|
+
|
326
|
+
<div class="method-description">
|
327
|
+
<p>
|
328
|
+
Alias for first?
|
329
|
+
</p>
|
330
|
+
</div>
|
331
|
+
</div>
|
332
|
+
|
333
|
+
<div id="method-M000018" class="method-detail">
|
334
|
+
<a name="M000018"></a>
|
335
|
+
|
336
|
+
<div class="method-heading">
|
337
|
+
<a href="#M000018" class="method-signature">
|
338
|
+
<span class="method-name">clone</span><span class="method-args">()</span>
|
339
|
+
</a>
|
340
|
+
</div>
|
341
|
+
|
342
|
+
<div class="method-description">
|
343
|
+
<p>
|
344
|
+
Create a shallow copy of the node. To create a deep copy call
|
345
|
+
Node#copy(true)
|
346
|
+
</p>
|
347
|
+
<p><a class="source-toggle" href="#"
|
348
|
+
onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
|
349
|
+
<div class="method-source-code" id="M000018-source">
|
350
|
+
<pre>
|
351
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 13</span>
|
352
|
+
13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone</span>
|
353
|
+
14: <span class="ruby-identifier">copy</span>(<span class="ruby-keyword kw">false</span>)
|
354
|
+
15: <span class="ruby-keyword kw">end</span>
|
355
|
+
</pre>
|
356
|
+
</div>
|
357
|
+
</div>
|
358
|
+
</div>
|
359
|
+
|
360
|
+
<div id="method-M000037" class="method-detail">
|
361
|
+
<a name="M000037"></a>
|
362
|
+
|
363
|
+
<div class="method-heading">
|
364
|
+
<a href="#M000037" class="method-signature">
|
365
|
+
<span class="method-name">comment?</span><span class="method-args">()</span>
|
366
|
+
</a>
|
367
|
+
</div>
|
368
|
+
|
369
|
+
<div class="method-description">
|
370
|
+
<p>
|
371
|
+
Specifies if this is an comment node
|
372
|
+
</p>
|
373
|
+
<p><a class="source-toggle" href="#"
|
374
|
+
onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
|
375
|
+
<div class="method-source-code" id="M000037-source">
|
376
|
+
<pre>
|
377
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 218</span>
|
378
|
+
218: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">comment?</span>
|
379
|
+
219: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">COMMENT_NODE</span>
|
380
|
+
220: <span class="ruby-keyword kw">end</span>
|
381
|
+
</pre>
|
382
|
+
</div>
|
383
|
+
</div>
|
384
|
+
</div>
|
385
|
+
|
386
|
+
<div id="method-M000021" class="method-detail">
|
387
|
+
<a name="M000021"></a>
|
388
|
+
|
389
|
+
<div class="method-heading">
|
390
|
+
<a href="#M000021" class="method-signature">
|
391
|
+
<span class="method-name">node.context(namespaces=nil) → XPath::Context<br />
|
392
|
+
</span>
|
393
|
+
</a>
|
394
|
+
</div>
|
395
|
+
|
396
|
+
<div class="method-description">
|
397
|
+
<p>
|
398
|
+
Returns a new XML::XPathContext for the current node.
|
399
|
+
</p>
|
400
|
+
<p>
|
401
|
+
<a href="Namespaces.html">Namespaces</a> is an optional array of XML::NS
|
402
|
+
objects
|
403
|
+
</p>
|
404
|
+
<p><a class="source-toggle" href="#"
|
405
|
+
onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
|
406
|
+
<div class="method-source-code" id="M000021-source">
|
407
|
+
<pre>
|
408
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 49</span>
|
409
|
+
49: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">context</span>(<span class="ruby-identifier">nslist</span> = <span class="ruby-keyword kw">nil</span>)
|
410
|
+
50: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">doc</span>
|
411
|
+
51: <span class="ruby-identifier">raise</span>(<span class="ruby-constant">TypeError</span>, <span class="ruby-value str">"A node must belong to a document before a xpath context can be created"</span>)
|
412
|
+
52: <span class="ruby-keyword kw">end</span>
|
413
|
+
53:
|
414
|
+
54: <span class="ruby-identifier">context</span> = <span class="ruby-constant">XPath</span><span class="ruby-operator">::</span><span class="ruby-constant">Context</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
|
415
|
+
55: <span class="ruby-identifier">context</span>.<span class="ruby-identifier">node</span> = <span class="ruby-keyword kw">self</span>
|
416
|
+
56: <span class="ruby-identifier">context</span>.<span class="ruby-identifier">register_namespaces_from_node</span>(<span class="ruby-keyword kw">self</span>)
|
417
|
+
57: <span class="ruby-identifier">context</span>.<span class="ruby-identifier">register_namespaces_from_node</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">root</span>)
|
418
|
+
58: <span class="ruby-identifier">context</span>.<span class="ruby-identifier">register_namespaces</span>(<span class="ruby-identifier">nslist</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">nslist</span>
|
419
|
+
59: <span class="ruby-identifier">context</span>
|
420
|
+
60: <span class="ruby-keyword kw">end</span>
|
421
|
+
</pre>
|
422
|
+
</div>
|
423
|
+
</div>
|
424
|
+
</div>
|
425
|
+
|
426
|
+
<div id="method-M000038" class="method-detail">
|
427
|
+
<a name="M000038"></a>
|
428
|
+
|
429
|
+
<div class="method-heading">
|
430
|
+
<a href="#M000038" class="method-signature">
|
431
|
+
<span class="method-name">docbook_doc?</span><span class="method-args">()</span>
|
432
|
+
</a>
|
433
|
+
</div>
|
434
|
+
|
435
|
+
<div class="method-description">
|
436
|
+
<p>
|
437
|
+
Specifies if this is an docbook node
|
438
|
+
</p>
|
439
|
+
<p><a class="source-toggle" href="#"
|
440
|
+
onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
|
441
|
+
<div class="method-source-code" id="M000038-source">
|
442
|
+
<pre>
|
443
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 223</span>
|
444
|
+
223: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">docbook_doc?</span>
|
445
|
+
224: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DOCB_DOCUMENT_NODE</span>
|
446
|
+
225: <span class="ruby-keyword kw">end</span>
|
447
|
+
</pre>
|
448
|
+
</div>
|
449
|
+
</div>
|
450
|
+
</div>
|
451
|
+
|
452
|
+
<div id="method-M000039" class="method-detail">
|
453
|
+
<a name="M000039"></a>
|
454
|
+
|
455
|
+
<div class="method-heading">
|
456
|
+
<a href="#M000039" class="method-signature">
|
457
|
+
<span class="method-name">doctype?</span><span class="method-args">()</span>
|
458
|
+
</a>
|
459
|
+
</div>
|
460
|
+
|
461
|
+
<div class="method-description">
|
462
|
+
<p>
|
463
|
+
Specifies if this is an docbook node
|
464
|
+
</p>
|
465
|
+
<p><a class="source-toggle" href="#"
|
466
|
+
onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
|
467
|
+
<div class="method-source-code" id="M000039-source">
|
468
|
+
<pre>
|
469
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 228</span>
|
470
|
+
228: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">doctype?</span>
|
471
|
+
229: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DOCUMENT_TYPE_NODE</span>
|
472
|
+
230: <span class="ruby-keyword kw">end</span>
|
473
|
+
</pre>
|
474
|
+
</div>
|
475
|
+
</div>
|
476
|
+
</div>
|
477
|
+
|
478
|
+
<div id="method-M000040" class="method-detail">
|
479
|
+
<a name="M000040"></a>
|
480
|
+
|
481
|
+
<div class="method-heading">
|
482
|
+
<a href="#M000040" class="method-signature">
|
483
|
+
<span class="method-name">document?</span><span class="method-args">()</span>
|
484
|
+
</a>
|
485
|
+
</div>
|
486
|
+
|
487
|
+
<div class="method-description">
|
488
|
+
<p>
|
489
|
+
Specifies if this is an DOCTYPE node
|
490
|
+
</p>
|
491
|
+
<p><a class="source-toggle" href="#"
|
492
|
+
onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
|
493
|
+
<div class="method-source-code" id="M000040-source">
|
494
|
+
<pre>
|
495
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 233</span>
|
496
|
+
233: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">document?</span>
|
497
|
+
234: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DOCUMENT_NODE</span>
|
498
|
+
235: <span class="ruby-keyword kw">end</span>
|
499
|
+
</pre>
|
500
|
+
</div>
|
501
|
+
</div>
|
502
|
+
</div>
|
503
|
+
|
504
|
+
<div id="method-M000041" class="method-detail">
|
505
|
+
<a name="M000041"></a>
|
506
|
+
|
507
|
+
<div class="method-heading">
|
508
|
+
<a href="#M000041" class="method-signature">
|
509
|
+
<span class="method-name">dtd?</span><span class="method-args">()</span>
|
510
|
+
</a>
|
511
|
+
</div>
|
512
|
+
|
513
|
+
<div class="method-description">
|
514
|
+
<p>
|
515
|
+
Specifies if this is an DTD node
|
516
|
+
</p>
|
517
|
+
<p><a class="source-toggle" href="#"
|
518
|
+
onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
|
519
|
+
<div class="method-source-code" id="M000041-source">
|
520
|
+
<pre>
|
521
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 238</span>
|
522
|
+
238: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dtd?</span>
|
523
|
+
239: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DTD_NODE</span>
|
524
|
+
240: <span class="ruby-keyword kw">end</span>
|
525
|
+
</pre>
|
526
|
+
</div>
|
527
|
+
</div>
|
528
|
+
</div>
|
529
|
+
|
530
|
+
<div id="method-M000020" class="method-detail">
|
531
|
+
<a name="M000020"></a>
|
532
|
+
|
533
|
+
<div class="method-heading">
|
534
|
+
<a href="#M000020" class="method-signature">
|
535
|
+
<span class="method-name">node.dup → XML::Node<br />
|
536
|
+
</span>
|
537
|
+
</a>
|
538
|
+
</div>
|
539
|
+
|
540
|
+
<div class="method-description">
|
541
|
+
<p>
|
542
|
+
Create a shallow copy of the node. To create a deep copy call
|
543
|
+
Node#copy(true)
|
544
|
+
</p>
|
545
|
+
<p><a class="source-toggle" href="#"
|
546
|
+
onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
|
547
|
+
<div class="method-source-code" id="M000020-source">
|
548
|
+
<pre>
|
549
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 39</span>
|
550
|
+
39: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dup</span>
|
551
|
+
40: <span class="ruby-identifier">copy</span>(<span class="ruby-keyword kw">false</span>)
|
552
|
+
41: <span class="ruby-keyword kw">end</span>
|
553
|
+
</pre>
|
554
|
+
</div>
|
555
|
+
</div>
|
556
|
+
</div>
|
557
|
+
|
558
|
+
<div id="method-M000025" class="method-detail">
|
559
|
+
<a name="M000025"></a>
|
560
|
+
|
561
|
+
<div class="method-heading">
|
562
|
+
<a href="#M000025" class="method-signature">
|
563
|
+
<span class="method-name">each_attr</span><span class="method-args">() {|attr| ...}</span>
|
564
|
+
</a>
|
565
|
+
</div>
|
566
|
+
|
567
|
+
<div class="method-description">
|
568
|
+
<p>
|
569
|
+
——- Traversal —————- Iterates
|
570
|
+
over this node‘s attributes.
|
571
|
+
</p>
|
572
|
+
<pre>
|
573
|
+
doc = XML::Document.new('model/books.xml')
|
574
|
+
doc.root.each_attr {|attr| puts attr}
|
575
|
+
</pre>
|
576
|
+
<p><a class="source-toggle" href="#"
|
577
|
+
onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
|
578
|
+
<div class="method-source-code" id="M000025-source">
|
579
|
+
<pre>
|
580
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 99</span>
|
581
|
+
99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_attr</span>
|
582
|
+
100: <span class="ruby-identifier">attributes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">attr</span><span class="ruby-operator">|</span>
|
583
|
+
101: <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">attr</span>)
|
584
|
+
102: <span class="ruby-keyword kw">end</span>
|
585
|
+
103: <span class="ruby-keyword kw">end</span>
|
586
|
+
</pre>
|
587
|
+
</div>
|
588
|
+
</div>
|
589
|
+
</div>
|
590
|
+
|
591
|
+
<div id="method-M000026" class="method-detail">
|
592
|
+
<a name="M000026"></a>
|
593
|
+
|
594
|
+
<div class="method-heading">
|
595
|
+
<a href="#M000026" class="method-signature">
|
596
|
+
<span class="method-name">each_element</span><span class="method-args">() {|node| ...}</span>
|
597
|
+
</a>
|
598
|
+
</div>
|
599
|
+
|
600
|
+
<div class="method-description">
|
601
|
+
<p>
|
602
|
+
Iterates over this node‘s child elements (nodes that have a node_type
|
603
|
+
== ELEMENT_NODE).
|
604
|
+
</p>
|
605
|
+
<pre>
|
606
|
+
doc = XML::Document.new('model/books.xml')
|
607
|
+
doc.root.each_element {|element| puts element}
|
608
|
+
</pre>
|
609
|
+
<p><a class="source-toggle" href="#"
|
610
|
+
onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
|
611
|
+
<div class="method-source-code" id="M000026-source">
|
612
|
+
<pre>
|
613
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 110</span>
|
614
|
+
110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_element</span>
|
615
|
+
111: <span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">node</span><span class="ruby-operator">|</span>
|
616
|
+
112: <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">node</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ELEMENT_NODE</span>
|
617
|
+
113: <span class="ruby-keyword kw">end</span>
|
618
|
+
114: <span class="ruby-keyword kw">end</span>
|
619
|
+
</pre>
|
620
|
+
</div>
|
621
|
+
</div>
|
622
|
+
</div>
|
623
|
+
|
624
|
+
<div id="method-M000042" class="method-detail">
|
625
|
+
<a name="M000042"></a>
|
626
|
+
|
627
|
+
<div class="method-heading">
|
628
|
+
<a href="#M000042" class="method-signature">
|
629
|
+
<span class="method-name">element?</span><span class="method-args">()</span>
|
630
|
+
</a>
|
631
|
+
</div>
|
632
|
+
|
633
|
+
<div class="method-description">
|
634
|
+
<p>
|
635
|
+
Specifies if this is an element node
|
636
|
+
</p>
|
637
|
+
<p><a class="source-toggle" href="#"
|
638
|
+
onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
|
639
|
+
<div class="method-source-code" id="M000042-source">
|
640
|
+
<pre>
|
641
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 243</span>
|
642
|
+
243: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">element?</span>
|
643
|
+
244: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ELEMENT_NODE</span>
|
644
|
+
245: <span class="ruby-keyword kw">end</span>
|
645
|
+
</pre>
|
646
|
+
</div>
|
647
|
+
</div>
|
648
|
+
</div>
|
649
|
+
|
650
|
+
<div id="method-M000044" class="method-detail">
|
651
|
+
<a name="M000044"></a>
|
652
|
+
|
653
|
+
<div class="method-heading">
|
654
|
+
<a href="#M000044" class="method-signature">
|
655
|
+
<span class="method-name">element_decl?</span><span class="method-args">()</span>
|
656
|
+
</a>
|
657
|
+
</div>
|
658
|
+
|
659
|
+
<div class="method-description">
|
660
|
+
<p>
|
661
|
+
Specifies if this is an element declaration node
|
662
|
+
</p>
|
663
|
+
<p><a class="source-toggle" href="#"
|
664
|
+
onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
|
665
|
+
<div class="method-source-code" id="M000044-source">
|
666
|
+
<pre>
|
667
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 253</span>
|
668
|
+
253: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">element_decl?</span>
|
669
|
+
254: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ELEMENT_DECL</span>
|
670
|
+
255: <span class="ruby-keyword kw">end</span>
|
671
|
+
</pre>
|
672
|
+
</div>
|
673
|
+
</div>
|
674
|
+
</div>
|
675
|
+
|
676
|
+
<div id="method-M000043" class="method-detail">
|
677
|
+
<a name="M000043"></a>
|
678
|
+
|
679
|
+
<div class="method-heading">
|
680
|
+
<a href="#M000043" class="method-signature">
|
681
|
+
<span class="method-name">entity?</span><span class="method-args">()</span>
|
682
|
+
</a>
|
683
|
+
</div>
|
684
|
+
|
685
|
+
<div class="method-description">
|
686
|
+
<p>
|
687
|
+
Specifies if this is an entity node
|
688
|
+
</p>
|
689
|
+
<p><a class="source-toggle" href="#"
|
690
|
+
onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
|
691
|
+
<div class="method-source-code" id="M000043-source">
|
692
|
+
<pre>
|
693
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 248</span>
|
694
|
+
248: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entity?</span>
|
695
|
+
249: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ENTITY_NODE</span>
|
696
|
+
250: <span class="ruby-keyword kw">end</span>
|
697
|
+
</pre>
|
698
|
+
</div>
|
699
|
+
</div>
|
700
|
+
</div>
|
701
|
+
|
702
|
+
<div id="method-M000045" class="method-detail">
|
703
|
+
<a name="M000045"></a>
|
704
|
+
|
705
|
+
<div class="method-heading">
|
706
|
+
<a href="#M000045" class="method-signature">
|
707
|
+
<span class="method-name">entity_ref?</span><span class="method-args">()</span>
|
708
|
+
</a>
|
709
|
+
</div>
|
710
|
+
|
711
|
+
<div class="method-description">
|
712
|
+
<p>
|
713
|
+
Specifies if this is an entity reference node
|
714
|
+
</p>
|
715
|
+
<p><a class="source-toggle" href="#"
|
716
|
+
onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
|
717
|
+
<div class="method-source-code" id="M000045-source">
|
718
|
+
<pre>
|
719
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 258</span>
|
720
|
+
258: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entity_ref?</span>
|
721
|
+
259: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">ENTITY_REF_NODE</span>
|
722
|
+
260: <span class="ruby-keyword kw">end</span>
|
723
|
+
</pre>
|
724
|
+
</div>
|
725
|
+
</div>
|
726
|
+
</div>
|
727
|
+
|
728
|
+
<div id="method-M000022" class="method-detail">
|
729
|
+
<a name="M000022"></a>
|
730
|
+
|
731
|
+
<div class="method-heading">
|
732
|
+
<a href="#M000022" class="method-signature">
|
733
|
+
<span class="method-name">node.find(namespaces=nil) → XPath::XPathObject<br />
|
734
|
+
</span>
|
735
|
+
</a>
|
736
|
+
</div>
|
737
|
+
|
738
|
+
<div class="method-description">
|
739
|
+
<p>
|
740
|
+
Return nodes matching the specified xpath expression. For more information,
|
741
|
+
please refer to the documentation for <a
|
742
|
+
href="Document.html#M000127">XML::Document#find</a>.
|
743
|
+
</p>
|
744
|
+
<p>
|
745
|
+
<a href="Namespaces.html">Namespaces</a> is an optional array of XML::NS
|
746
|
+
objects
|
747
|
+
</p>
|
748
|
+
<p><a class="source-toggle" href="#"
|
749
|
+
onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
|
750
|
+
<div class="method-source-code" id="M000022-source">
|
751
|
+
<pre>
|
752
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 70</span>
|
753
|
+
70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find</span>(<span class="ruby-identifier">xpath</span>, <span class="ruby-identifier">nslist</span> = <span class="ruby-keyword kw">nil</span>)
|
754
|
+
71: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">context</span>(<span class="ruby-identifier">nslist</span>).<span class="ruby-identifier">find</span>(<span class="ruby-identifier">xpath</span>)
|
755
|
+
72: <span class="ruby-keyword kw">end</span>
|
756
|
+
</pre>
|
757
|
+
</div>
|
758
|
+
</div>
|
759
|
+
</div>
|
760
|
+
|
761
|
+
<div id="method-M000023" class="method-detail">
|
762
|
+
<a name="M000023"></a>
|
763
|
+
|
764
|
+
<div class="method-heading">
|
765
|
+
<a href="#M000023" class="method-signature">
|
766
|
+
<span class="method-name">node.find_first(namespaces=nil) → XML::Node<br />
|
767
|
+
</span>
|
768
|
+
</a>
|
769
|
+
</div>
|
770
|
+
|
771
|
+
<div class="method-description">
|
772
|
+
<p>
|
773
|
+
Return the first node matching the specified xpath expression. For more
|
774
|
+
information, please refer to the documentation for the <a
|
775
|
+
href="Node.html#M000022">find</a> method.
|
776
|
+
</p>
|
777
|
+
<p><a class="source-toggle" href="#"
|
778
|
+
onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
|
779
|
+
<div class="method-source-code" id="M000023-source">
|
780
|
+
<pre>
|
781
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 80</span>
|
782
|
+
80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_first</span>(<span class="ruby-identifier">xpath</span>, <span class="ruby-identifier">nslist</span> = <span class="ruby-keyword kw">nil</span>)
|
783
|
+
81: <span class="ruby-identifier">find</span>(<span class="ruby-identifier">xpath</span>, <span class="ruby-identifier">nslist</span>).<span class="ruby-identifier">first</span>
|
784
|
+
82: <span class="ruby-keyword kw">end</span>
|
785
|
+
</pre>
|
786
|
+
</div>
|
787
|
+
</div>
|
788
|
+
</div>
|
789
|
+
|
790
|
+
<div id="method-M000028" class="method-detail">
|
791
|
+
<a name="M000028"></a>
|
792
|
+
|
793
|
+
<div class="method-heading">
|
794
|
+
<a href="#M000028" class="method-signature">
|
795
|
+
<span class="method-name">first?</span><span class="method-args">()</span>
|
796
|
+
</a>
|
797
|
+
</div>
|
798
|
+
|
799
|
+
<div class="method-description">
|
800
|
+
<p>
|
801
|
+
Determines whether this node has a first node
|
802
|
+
</p>
|
803
|
+
<p><a class="source-toggle" href="#"
|
804
|
+
onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
|
805
|
+
<div class="method-source-code" id="M000028-source">
|
806
|
+
<pre>
|
807
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 122</span>
|
808
|
+
122: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">first?</span>
|
809
|
+
123: <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">first</span>.<span class="ruby-identifier">nil?</span>
|
810
|
+
124: <span class="ruby-keyword kw">end</span>
|
811
|
+
</pre>
|
812
|
+
</div>
|
813
|
+
</div>
|
814
|
+
</div>
|
815
|
+
|
816
|
+
<div id="method-M000046" class="method-detail">
|
817
|
+
<a name="M000046"></a>
|
818
|
+
|
819
|
+
<div class="method-heading">
|
820
|
+
<a href="#M000046" class="method-signature">
|
821
|
+
<span class="method-name">fragment?</span><span class="method-args">()</span>
|
822
|
+
</a>
|
823
|
+
</div>
|
824
|
+
|
825
|
+
<div class="method-description">
|
826
|
+
<p>
|
827
|
+
Specifies if this is a fragment node
|
828
|
+
</p>
|
829
|
+
<p><a class="source-toggle" href="#"
|
830
|
+
onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
|
831
|
+
<div class="method-source-code" id="M000046-source">
|
832
|
+
<pre>
|
833
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 263</span>
|
834
|
+
263: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fragment?</span>
|
835
|
+
264: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">DOCUMENT_FRAG_NODE</span>
|
836
|
+
265: <span class="ruby-keyword kw">end</span>
|
837
|
+
</pre>
|
838
|
+
</div>
|
839
|
+
</div>
|
840
|
+
</div>
|
841
|
+
|
842
|
+
<div id="method-M000047" class="method-detail">
|
843
|
+
<a name="M000047"></a>
|
844
|
+
|
845
|
+
<div class="method-heading">
|
846
|
+
<a href="#M000047" class="method-signature">
|
847
|
+
<span class="method-name">html_doc?</span><span class="method-args">()</span>
|
848
|
+
</a>
|
849
|
+
</div>
|
850
|
+
|
851
|
+
<div class="method-description">
|
852
|
+
<p>
|
853
|
+
Specifies if this is a html document node
|
854
|
+
</p>
|
855
|
+
<p><a class="source-toggle" href="#"
|
856
|
+
onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
|
857
|
+
<div class="method-source-code" id="M000047-source">
|
858
|
+
<pre>
|
859
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 268</span>
|
860
|
+
268: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">html_doc?</span>
|
861
|
+
269: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">HTML_DOCUMENT_NODE</span>
|
862
|
+
270: <span class="ruby-keyword kw">end</span>
|
863
|
+
</pre>
|
864
|
+
</div>
|
865
|
+
</div>
|
866
|
+
</div>
|
867
|
+
|
868
|
+
<div id="method-M000019" class="method-detail">
|
869
|
+
<a name="M000019"></a>
|
870
|
+
|
871
|
+
<div class="method-heading">
|
872
|
+
<a href="#M000019" class="method-signature">
|
873
|
+
<span class="method-name">node.inner_xml → "string"<br />
|
874
|
+
node.inner_xml(:indent => true, :encoding => 'UTF-8', :level => 0) → "string"<br />
|
875
|
+
</span>
|
876
|
+
</a>
|
877
|
+
</div>
|
878
|
+
|
879
|
+
<div class="method-description">
|
880
|
+
<p>
|
881
|
+
Converts a node‘s <a href="Node.html#M000029">children</a>, to a
|
882
|
+
string representation. To include the node, use XML::Node#to_s. For more
|
883
|
+
information about the supported options, see XML::Node#to_s.
|
884
|
+
</p>
|
885
|
+
<p><a class="source-toggle" href="#"
|
886
|
+
onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
|
887
|
+
<div class="method-source-code" id="M000019-source">
|
888
|
+
<pre>
|
889
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 24</span>
|
890
|
+
24: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inner_xml</span>(<span class="ruby-identifier">options</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>)
|
891
|
+
25: <span class="ruby-identifier">io</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
|
892
|
+
26:
|
893
|
+
27: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">node</span><span class="ruby-operator">|</span>
|
894
|
+
28: <span class="ruby-identifier">io</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">node</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-identifier">options</span>)
|
895
|
+
29: <span class="ruby-keyword kw">end</span>
|
896
|
+
30:
|
897
|
+
31: <span class="ruby-identifier">io</span>.<span class="ruby-identifier">string</span>
|
898
|
+
32: <span class="ruby-keyword kw">end</span>
|
899
|
+
</pre>
|
900
|
+
</div>
|
901
|
+
</div>
|
902
|
+
</div>
|
903
|
+
|
904
|
+
<div id="method-M000032" class="method-detail">
|
905
|
+
<a name="M000032"></a>
|
906
|
+
|
907
|
+
<div class="method-heading">
|
908
|
+
<a href="#M000032" class="method-signature">
|
909
|
+
<span class="method-name">last?</span><span class="method-args">()</span>
|
910
|
+
</a>
|
911
|
+
</div>
|
912
|
+
|
913
|
+
<div class="method-description">
|
914
|
+
<p>
|
915
|
+
Determines whether this node has a last node
|
916
|
+
</p>
|
917
|
+
<p><a class="source-toggle" href="#"
|
918
|
+
onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
|
919
|
+
<div class="method-source-code" id="M000032-source">
|
920
|
+
<pre>
|
921
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 142</span>
|
922
|
+
142: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">last?</span>
|
923
|
+
143: <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">last</span>.<span class="ruby-identifier">nil?</span>
|
924
|
+
144: <span class="ruby-keyword kw">end</span>
|
925
|
+
</pre>
|
926
|
+
</div>
|
927
|
+
</div>
|
928
|
+
</div>
|
929
|
+
|
930
|
+
<div id="method-M000048" class="method-detail">
|
931
|
+
<a name="M000048"></a>
|
932
|
+
|
933
|
+
<div class="method-heading">
|
934
|
+
<a href="#M000048" class="method-signature">
|
935
|
+
<span class="method-name">namespace?</span><span class="method-args">()</span>
|
936
|
+
</a>
|
937
|
+
</div>
|
938
|
+
|
939
|
+
<div class="method-description">
|
940
|
+
<p>
|
941
|
+
Specifies if this is a namespace node (not if it has a namepsace)
|
942
|
+
</p>
|
943
|
+
<p><a class="source-toggle" href="#"
|
944
|
+
onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
|
945
|
+
<div class="method-source-code" id="M000048-source">
|
946
|
+
<pre>
|
947
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 274</span>
|
948
|
+
274: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">namespace?</span>
|
949
|
+
275: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">NAMESPACE_DECL</span>
|
950
|
+
276: <span class="ruby-keyword kw">end</span>
|
951
|
+
</pre>
|
952
|
+
</div>
|
953
|
+
</div>
|
954
|
+
</div>
|
955
|
+
|
956
|
+
<div id="method-M000024" class="method-detail">
|
957
|
+
<a name="M000024"></a>
|
958
|
+
|
959
|
+
<div class="method-heading">
|
960
|
+
<a href="#M000024" class="method-signature">
|
961
|
+
<span class="method-name">node.namespacess → XML::Namespaces<br />
|
962
|
+
</span>
|
963
|
+
</a>
|
964
|
+
</div>
|
965
|
+
|
966
|
+
<div class="method-description">
|
967
|
+
<p>
|
968
|
+
Returns this node‘s <a href="Namespaces.html">XML::Namespaces</a>
|
969
|
+
object, which is used to access the <a
|
970
|
+
href="Node.html#M000024">namespaces</a> associated with this node.
|
971
|
+
</p>
|
972
|
+
<p><a class="source-toggle" href="#"
|
973
|
+
onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
|
974
|
+
<div class="method-source-code" id="M000024-source">
|
975
|
+
<pre>
|
976
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 90</span>
|
977
|
+
90: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">namespaces</span>
|
978
|
+
91: <span class="ruby-ivar">@namespaces</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Namespaces</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
|
979
|
+
92: <span class="ruby-keyword kw">end</span>
|
980
|
+
</pre>
|
981
|
+
</div>
|
982
|
+
</div>
|
983
|
+
</div>
|
984
|
+
|
985
|
+
<div id="method-M000030" class="method-detail">
|
986
|
+
<a name="M000030"></a>
|
987
|
+
|
988
|
+
<div class="method-heading">
|
989
|
+
<a href="#M000030" class="method-signature">
|
990
|
+
<span class="method-name">next?</span><span class="method-args">()</span>
|
991
|
+
</a>
|
992
|
+
</div>
|
993
|
+
|
994
|
+
<div class="method-description">
|
995
|
+
<p>
|
996
|
+
Determines whether this node has a next node
|
997
|
+
</p>
|
998
|
+
<p><a class="source-toggle" href="#"
|
999
|
+
onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
|
1000
|
+
<div class="method-source-code" id="M000030-source">
|
1001
|
+
<pre>
|
1002
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 132</span>
|
1003
|
+
132: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">next?</span>
|
1004
|
+
133: <span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">next</span>.<span class="ruby-identifier">nil?</span>
|
1005
|
+
134: <span class="ruby-keyword kw">end</span>
|
1006
|
+
</pre>
|
1007
|
+
</div>
|
1008
|
+
</div>
|
1009
|
+
</div>
|
1010
|
+
|
1011
|
+
<div id="method-M000033" class="method-detail">
|
1012
|
+
<a name="M000033"></a>
|
1013
|
+
|
1014
|
+
<div class="method-heading">
|
1015
|
+
<a href="#M000033" class="method-signature">
|
1016
|
+
<span class="method-name">node_type_name</span><span class="method-args">()</span>
|
1017
|
+
</a>
|
1018
|
+
</div>
|
1019
|
+
|
1020
|
+
<div class="method-description">
|
1021
|
+
<p>
|
1022
|
+
Returns this node‘s type name
|
1023
|
+
</p>
|
1024
|
+
<p><a class="source-toggle" href="#"
|
1025
|
+
onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
|
1026
|
+
<div class="method-source-code" id="M000033-source">
|
1027
|
+
<pre>
|
1028
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 150</span>
|
1029
|
+
150: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">node_type_name</span>
|
1030
|
+
151: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">node_type</span>
|
1031
|
+
152: <span class="ruby-comment cmt"># Most common choices first</span>
|
1032
|
+
153: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ATTRIBUTE_NODE</span>
|
1033
|
+
154: <span class="ruby-value str">'attribute'</span>
|
1034
|
+
155: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">DOCUMENT_NODE</span>
|
1035
|
+
156: <span class="ruby-value str">'document_xml'</span>
|
1036
|
+
157: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ELEMENT_NODE</span>
|
1037
|
+
158: <span class="ruby-value str">'element'</span>
|
1038
|
+
159: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">TEXT_NODE</span>
|
1039
|
+
160: <span class="ruby-value str">'text'</span>
|
1040
|
+
161:
|
1041
|
+
162: <span class="ruby-comment cmt"># Now the rest </span>
|
1042
|
+
163: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ATTRIBUTE_DECL</span>
|
1043
|
+
164: <span class="ruby-value str">'attribute_decl'</span>
|
1044
|
+
165: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">CDATA_SECTION_NODE</span>
|
1045
|
+
166: <span class="ruby-value str">'cdata'</span>
|
1046
|
+
167: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">COMMENT_NODE</span>
|
1047
|
+
168: <span class="ruby-value str">'comment'</span>
|
1048
|
+
169: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">DOCB_DOCUMENT_NODE</span>
|
1049
|
+
170: <span class="ruby-value str">'document_docbook'</span>
|
1050
|
+
171: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">DOCUMENT_FRAG_NODE</span>
|
1051
|
+
172: <span class="ruby-value str">'fragment'</span>
|
1052
|
+
173: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">DOCUMENT_TYPE_NODE</span>
|
1053
|
+
174: <span class="ruby-value str">'doctype'</span>
|
1054
|
+
175: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">DTD_NODE</span>
|
1055
|
+
176: <span class="ruby-value str">'dtd'</span>
|
1056
|
+
177: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ELEMENT_DECL</span>
|
1057
|
+
178: <span class="ruby-value str">'elem_decl'</span>
|
1058
|
+
179: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ENTITY_DECL</span>
|
1059
|
+
180: <span class="ruby-value str">'entity_decl'</span>
|
1060
|
+
181: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ENTITY_NODE</span>
|
1061
|
+
182: <span class="ruby-value str">'entity'</span>
|
1062
|
+
183: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">ENTITY_REF_NODE</span>
|
1063
|
+
184: <span class="ruby-value str">'entity_ref'</span>
|
1064
|
+
185: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">HTML_DOCUMENT_NODE</span>
|
1065
|
+
186: <span class="ruby-value str">'document_html'</span>
|
1066
|
+
187: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">NAMESPACE_DECL</span>
|
1067
|
+
188: <span class="ruby-value str">'namespace'</span>
|
1068
|
+
189: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">NOTATION_NODE</span>
|
1069
|
+
190: <span class="ruby-value str">'notation'</span>
|
1070
|
+
191: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">PI_NODE</span>
|
1071
|
+
192: <span class="ruby-value str">'pi'</span>
|
1072
|
+
193: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">XINCLUDE_START</span>
|
1073
|
+
194: <span class="ruby-value str">'xinclude_start'</span>
|
1074
|
+
195: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">XINCLUDE_END</span>
|
1075
|
+
196: <span class="ruby-value str">'xinclude_end'</span>
|
1076
|
+
197: <span class="ruby-keyword kw">else</span>
|
1077
|
+
198: <span class="ruby-identifier">raise</span>(<span class="ruby-constant">UnknownType</span>, <span class="ruby-value str">"Unknown node type: %n"</span>, <span class="ruby-identifier">node</span>.<span class="ruby-identifier">node_type</span>);
|
1078
|
+
199: <span class="ruby-keyword kw">end</span>
|
1079
|
+
200: <span class="ruby-keyword kw">end</span>
|
1080
|
+
</pre>
|
1081
|
+
</div>
|
1082
|
+
</div>
|
1083
|
+
</div>
|
1084
|
+
|
1085
|
+
<div id="method-M000049" class="method-detail">
|
1086
|
+
<a name="M000049"></a>
|
1087
|
+
|
1088
|
+
<div class="method-heading">
|
1089
|
+
<a href="#M000049" class="method-signature">
|
1090
|
+
<span class="method-name">notation?</span><span class="method-args">()</span>
|
1091
|
+
</a>
|
1092
|
+
</div>
|
1093
|
+
|
1094
|
+
<div class="method-description">
|
1095
|
+
<p>
|
1096
|
+
Specifies if this is a notation node
|
1097
|
+
</p>
|
1098
|
+
<p><a class="source-toggle" href="#"
|
1099
|
+
onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
|
1100
|
+
<div class="method-source-code" id="M000049-source">
|
1101
|
+
<pre>
|
1102
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 279</span>
|
1103
|
+
279: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">notation?</span>
|
1104
|
+
280: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">NOTATION_NODE</span>
|
1105
|
+
281: <span class="ruby-keyword kw">end</span>
|
1106
|
+
</pre>
|
1107
|
+
</div>
|
1108
|
+
</div>
|
1109
|
+
</div>
|
1110
|
+
|
1111
|
+
<div id="method-M000027" class="method-detail">
|
1112
|
+
<a name="M000027"></a>
|
1113
|
+
|
1114
|
+
<div class="method-heading">
|
1115
|
+
<a href="#M000027" class="method-signature">
|
1116
|
+
<span class="method-name">parent?</span><span class="method-args">()</span>
|
1117
|
+
</a>
|
1118
|
+
</div>
|
1119
|
+
|
1120
|
+
<div class="method-description">
|
1121
|
+
<p>
|
1122
|
+
Determines whether this node has a parent node
|
1123
|
+
</p>
|
1124
|
+
<p><a class="source-toggle" href="#"
|
1125
|
+
onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
|
1126
|
+
<div class="method-source-code" id="M000027-source">
|
1127
|
+
<pre>
|
1128
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 117</span>
|
1129
|
+
117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parent?</span>
|
1130
|
+
118: <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">parent</span>.<span class="ruby-identifier">nil?</span>
|
1131
|
+
119: <span class="ruby-keyword kw">end</span>
|
1132
|
+
</pre>
|
1133
|
+
</div>
|
1134
|
+
</div>
|
1135
|
+
</div>
|
1136
|
+
|
1137
|
+
<div id="method-M000050" class="method-detail">
|
1138
|
+
<a name="M000050"></a>
|
1139
|
+
|
1140
|
+
<div class="method-heading">
|
1141
|
+
<a href="#M000050" class="method-signature">
|
1142
|
+
<span class="method-name">pi?</span><span class="method-args">()</span>
|
1143
|
+
</a>
|
1144
|
+
</div>
|
1145
|
+
|
1146
|
+
<div class="method-description">
|
1147
|
+
<p>
|
1148
|
+
Specifies if this is a processiong instruction node
|
1149
|
+
</p>
|
1150
|
+
<p><a class="source-toggle" href="#"
|
1151
|
+
onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
|
1152
|
+
<div class="method-source-code" id="M000050-source">
|
1153
|
+
<pre>
|
1154
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 284</span>
|
1155
|
+
284: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pi?</span>
|
1156
|
+
285: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">PI_NODE</span>
|
1157
|
+
286: <span class="ruby-keyword kw">end</span>
|
1158
|
+
</pre>
|
1159
|
+
</div>
|
1160
|
+
</div>
|
1161
|
+
</div>
|
1162
|
+
|
1163
|
+
<div id="method-M000031" class="method-detail">
|
1164
|
+
<a name="M000031"></a>
|
1165
|
+
|
1166
|
+
<div class="method-heading">
|
1167
|
+
<a href="#M000031" class="method-signature">
|
1168
|
+
<span class="method-name">prev?</span><span class="method-args">()</span>
|
1169
|
+
</a>
|
1170
|
+
</div>
|
1171
|
+
|
1172
|
+
<div class="method-description">
|
1173
|
+
<p>
|
1174
|
+
Determines whether this node has a previous node
|
1175
|
+
</p>
|
1176
|
+
<p><a class="source-toggle" href="#"
|
1177
|
+
onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
|
1178
|
+
<div class="method-source-code" id="M000031-source">
|
1179
|
+
<pre>
|
1180
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 137</span>
|
1181
|
+
137: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prev?</span>
|
1182
|
+
138: <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">prev</span>.<span class="ruby-identifier">nil?</span>
|
1183
|
+
139: <span class="ruby-keyword kw">end</span>
|
1184
|
+
</pre>
|
1185
|
+
</div>
|
1186
|
+
</div>
|
1187
|
+
</div>
|
1188
|
+
|
1189
|
+
<div id="method-M000057" class="method-detail">
|
1190
|
+
<a name="M000057"></a>
|
1191
|
+
|
1192
|
+
<div class="method-heading">
|
1193
|
+
<a href="#M000057" class="method-signature">
|
1194
|
+
<span class="method-name">properties</span><span class="method-args">()</span>
|
1195
|
+
</a>
|
1196
|
+
</div>
|
1197
|
+
|
1198
|
+
<div class="method-description">
|
1199
|
+
<p><a class="source-toggle" href="#"
|
1200
|
+
onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
|
1201
|
+
<div class="method-source-code" id="M000057-source">
|
1202
|
+
<pre>
|
1203
|
+
<span class="ruby-comment cmt"># File lib/libxml/properties.rb, line 9</span>
|
1204
|
+
9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">properties</span>
|
1205
|
+
10: <span class="ruby-identifier">warn</span>(<span class="ruby-value str">'Node#properties is deprecated. Use Node#attributes instead.'</span>)
|
1206
|
+
11: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">attributes</span>
|
1207
|
+
12: <span class="ruby-keyword kw">end</span>
|
1208
|
+
</pre>
|
1209
|
+
</div>
|
1210
|
+
</div>
|
1211
|
+
</div>
|
1212
|
+
|
1213
|
+
<div id="method-M000058" class="method-detail">
|
1214
|
+
<a name="M000058"></a>
|
1215
|
+
|
1216
|
+
<div class="method-heading">
|
1217
|
+
<a href="#M000058" class="method-signature">
|
1218
|
+
<span class="method-name">properties?</span><span class="method-args">()</span>
|
1219
|
+
</a>
|
1220
|
+
</div>
|
1221
|
+
|
1222
|
+
<div class="method-description">
|
1223
|
+
<p><a class="source-toggle" href="#"
|
1224
|
+
onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
|
1225
|
+
<div class="method-source-code" id="M000058-source">
|
1226
|
+
<pre>
|
1227
|
+
<span class="ruby-comment cmt"># File lib/libxml/properties.rb, line 14</span>
|
1228
|
+
14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">properties?</span>
|
1229
|
+
15: <span class="ruby-identifier">warn</span>(<span class="ruby-value str">'Node#properties? is deprecated. Use Node#attributes? instead.'</span>)
|
1230
|
+
16: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">attributes?</span>
|
1231
|
+
17: <span class="ruby-keyword kw">end</span>
|
1232
|
+
</pre>
|
1233
|
+
</div>
|
1234
|
+
</div>
|
1235
|
+
</div>
|
1236
|
+
|
1237
|
+
<div id="method-M000056" class="method-detail">
|
1238
|
+
<a name="M000056"></a>
|
1239
|
+
|
1240
|
+
<div class="method-heading">
|
1241
|
+
<a href="#M000056" class="method-signature">
|
1242
|
+
<span class="method-name">property</span><span class="method-args">(name)</span>
|
1243
|
+
</a>
|
1244
|
+
</div>
|
1245
|
+
|
1246
|
+
<div class="method-description">
|
1247
|
+
<p><a class="source-toggle" href="#"
|
1248
|
+
onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
|
1249
|
+
<div class="method-source-code" id="M000056-source">
|
1250
|
+
<pre>
|
1251
|
+
<span class="ruby-comment cmt"># File lib/libxml/properties.rb, line 4</span>
|
1252
|
+
4: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">property</span>(<span class="ruby-identifier">name</span>)
|
1253
|
+
5: <span class="ruby-identifier">warn</span>(<span class="ruby-value str">'Node#properties is deprecated. Use Node#[] instead.'</span>)
|
1254
|
+
6: <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">name</span>]
|
1255
|
+
7: <span class="ruby-keyword kw">end</span>
|
1256
|
+
</pre>
|
1257
|
+
</div>
|
1258
|
+
</div>
|
1259
|
+
</div>
|
1260
|
+
|
1261
|
+
<div id="method-M000051" class="method-detail">
|
1262
|
+
<a name="M000051"></a>
|
1263
|
+
|
1264
|
+
<div class="method-heading">
|
1265
|
+
<a href="#M000051" class="method-signature">
|
1266
|
+
<span class="method-name">text?</span><span class="method-args">()</span>
|
1267
|
+
</a>
|
1268
|
+
</div>
|
1269
|
+
|
1270
|
+
<div class="method-description">
|
1271
|
+
<p>
|
1272
|
+
Specifies if this is a text node
|
1273
|
+
</p>
|
1274
|
+
<p><a class="source-toggle" href="#"
|
1275
|
+
onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
|
1276
|
+
<div class="method-source-code" id="M000051-source">
|
1277
|
+
<pre>
|
1278
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 289</span>
|
1279
|
+
289: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">text?</span>
|
1280
|
+
290: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">TEXT_NODE</span>
|
1281
|
+
291: <span class="ruby-keyword kw">end</span>
|
1282
|
+
</pre>
|
1283
|
+
</div>
|
1284
|
+
</div>
|
1285
|
+
</div>
|
1286
|
+
|
1287
|
+
<div id="method-M000052" class="method-detail">
|
1288
|
+
<a name="M000052"></a>
|
1289
|
+
|
1290
|
+
<div class="method-heading">
|
1291
|
+
<a href="#M000052" class="method-signature">
|
1292
|
+
<span class="method-name">xinclude_end?</span><span class="method-args">()</span>
|
1293
|
+
</a>
|
1294
|
+
</div>
|
1295
|
+
|
1296
|
+
<div class="method-description">
|
1297
|
+
<p>
|
1298
|
+
Specifies if this is an xinclude end node
|
1299
|
+
</p>
|
1300
|
+
<p><a class="source-toggle" href="#"
|
1301
|
+
onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
|
1302
|
+
<div class="method-source-code" id="M000052-source">
|
1303
|
+
<pre>
|
1304
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 294</span>
|
1305
|
+
294: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xinclude_end?</span>
|
1306
|
+
295: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">XINCLUDE_END</span>
|
1307
|
+
296: <span class="ruby-keyword kw">end</span>
|
1308
|
+
</pre>
|
1309
|
+
</div>
|
1310
|
+
</div>
|
1311
|
+
</div>
|
1312
|
+
|
1313
|
+
<div id="method-M000053" class="method-detail">
|
1314
|
+
<a name="M000053"></a>
|
1315
|
+
|
1316
|
+
<div class="method-heading">
|
1317
|
+
<a href="#M000053" class="method-signature">
|
1318
|
+
<span class="method-name">xinclude_start?</span><span class="method-args">()</span>
|
1319
|
+
</a>
|
1320
|
+
</div>
|
1321
|
+
|
1322
|
+
<div class="method-description">
|
1323
|
+
<p>
|
1324
|
+
Specifies if this is an xinclude start node
|
1325
|
+
</p>
|
1326
|
+
<p><a class="source-toggle" href="#"
|
1327
|
+
onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
|
1328
|
+
<div class="method-source-code" id="M000053-source">
|
1329
|
+
<pre>
|
1330
|
+
<span class="ruby-comment cmt"># File lib/libxml/node.rb, line 299</span>
|
1331
|
+
299: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xinclude_start?</span>
|
1332
|
+
300: <span class="ruby-identifier">node_type</span> <span class="ruby-operator">==</span> <span class="ruby-constant">XINCLUDE_START</span>
|
1333
|
+
301: <span class="ruby-keyword kw">end</span>
|
1334
|
+
</pre>
|
1335
|
+
</div>
|
1336
|
+
</div>
|
1337
|
+
</div>
|
1338
|
+
|
1339
|
+
|
1340
|
+
</div>
|
1341
|
+
|
1342
|
+
|
1343
|
+
</div>
|
1344
|
+
|
1345
|
+
|
1346
|
+
<div id="validator-badges">
|
1347
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
1348
|
+
</div>
|
1349
|
+
|
1350
|
+
</body>
|
1351
|
+
</html>
|