libxml-ruby 0.8.1-x86-mswin32-60 → 0.8.2-x86-mswin32-60
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +21 -0
- data/RAKEFILE +213 -0
- data/README +32 -11
- data/doc/rdoc/classes/LibXML.html +4 -0
- data/doc/rdoc/classes/LibXML/XML.html +7 -0
- data/doc/rdoc/classes/LibXML/XML/Attr.html +187 -177
- data/doc/rdoc/classes/LibXML/XML/Attributes.html +62 -61
- data/doc/rdoc/classes/LibXML/XML/Document.html +318 -254
- data/doc/rdoc/classes/LibXML/XML/Dtd.html +62 -8
- data/doc/rdoc/classes/LibXML/XML/Error.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/HTMLParser.html +59 -41
- data/doc/rdoc/classes/LibXML/XML/InputCallbacks.html +12 -6
- data/doc/rdoc/classes/LibXML/XML/NS.html +65 -50
- data/doc/rdoc/classes/LibXML/XML/Node.html +671 -630
- data/doc/rdoc/classes/LibXML/XML/Node/FailedModify.html +12 -0
- data/doc/rdoc/classes/LibXML/XML/Node/Set.html +64 -60
- data/doc/rdoc/classes/LibXML/XML/Node/SetNamespace.html +12 -0
- data/doc/rdoc/classes/LibXML/XML/Node/UnknownType.html +12 -0
- data/doc/rdoc/classes/LibXML/XML/Parser.html +407 -383
- data/doc/rdoc/classes/LibXML/XML/Parser/Context.html +241 -219
- data/doc/rdoc/classes/LibXML/XML/Parser/ParseError.html +12 -0
- data/doc/rdoc/classes/LibXML/XML/Reader.html +421 -331
- data/doc/rdoc/classes/LibXML/XML/RelaxNG.html +237 -0
- data/doc/rdoc/classes/LibXML/XML/SaxParser.html +79 -60
- data/doc/rdoc/classes/LibXML/XML/Schema.html +109 -22
- data/doc/rdoc/classes/LibXML/XML/State.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XInclude.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XInclude/Error.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XPath.html +4 -48
- data/doc/rdoc/classes/LibXML/XML/XPath/Context.html +6 -5
- data/doc/rdoc/classes/LibXML/XML/XPath/InvalidPath.html +61 -0
- data/doc/rdoc/classes/LibXML/XML/XPath/Object.html +12 -8
- data/doc/rdoc/classes/LibXML/XML/XPointer.html +14 -8
- data/doc/rdoc/classes/LibXML/XML/XPointer/Context.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XPointer/Context/InvalidPath.html +6 -0
- data/doc/rdoc/classes/LibXML/XML/XPointer/InvalidExpression.html +13 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/CHANGES.html +38 -10
- data/doc/rdoc/files/LICENSE.html +1 -1
- data/doc/rdoc/files/README.html +57 -23
- data/doc/rdoc/files/VERSION.html +1 -1
- data/doc/rdoc/files/ext/libxml/cbg_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/libxml_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_attr_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_attributes_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_document_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_dtd_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_html_parser_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_input_cbg_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_node_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_node_set_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_ns_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_parser_context_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_reader_c.html +1 -1
- data/doc/rdoc/{classes/XML.html → files/ext/libxml/ruby_xml_relaxng_c.html} +16 -35
- data/doc/rdoc/files/ext/libxml/ruby_xml_sax_parser_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_schema_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_state_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xinclude_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_context_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpath_object_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_c.html +1 -1
- data/doc/rdoc/files/ext/libxml/ruby_xml_xpointer_context_c.html +1 -1
- data/doc/rdoc/files/lib/libxml/attr_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/attributes_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/document_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/node_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/node_set_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/parser_options_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/parser_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/properties_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml/tree_rb.html +1 -1
- data/doc/rdoc/files/lib/libxml_rb.html +2 -2
- data/doc/rdoc/files/lib/xml/libxml_rb.html +12 -2
- data/doc/rdoc/files/lib/xml_rb.html +134 -0
- data/doc/rdoc/fr_class_index.html +1 -1
- data/doc/rdoc/fr_file_index.html +2 -0
- data/doc/rdoc/fr_method_index.html +349 -344
- data/ext/libxml/libxml.c +2 -1
- data/ext/libxml/ruby_libxml.h +1 -0
- data/ext/libxml/ruby_xml_attr.c +8 -2
- data/ext/libxml/ruby_xml_attributes.c +5 -5
- data/ext/libxml/ruby_xml_document.c +41 -2
- data/ext/libxml/ruby_xml_dtd.c +169 -169
- data/ext/libxml/ruby_xml_html_parser.c +449 -449
- data/ext/libxml/ruby_xml_input_cbg.c +165 -165
- data/ext/libxml/ruby_xml_node.c +1 -1
- data/ext/libxml/ruby_xml_node_set.c +172 -172
- data/ext/libxml/ruby_xml_ns.c +145 -145
- data/ext/libxml/ruby_xml_parser.c +1398 -1398
- data/ext/libxml/ruby_xml_parser_context.c +697 -697
- data/ext/libxml/ruby_xml_reader.c +44 -0
- data/ext/libxml/ruby_xml_reader.h +14 -14
- data/ext/libxml/ruby_xml_relaxng.c +97 -0
- data/ext/libxml/ruby_xml_relaxng.h +15 -0
- data/ext/libxml/ruby_xml_sax_parser.c +486 -486
- data/ext/libxml/ruby_xml_schema.c +1 -1
- data/ext/libxml/ruby_xml_state.c +4 -4
- data/ext/libxml/ruby_xml_xinclude.c +21 -21
- data/ext/libxml/ruby_xml_xpath.c +89 -89
- data/ext/libxml/ruby_xml_xpath_context.c +283 -283
- data/ext/libxml/ruby_xml_xpath_object.c +5 -5
- data/ext/libxml/ruby_xml_xpointer.c +104 -104
- data/ext/libxml/ruby_xml_xpointer_context.c +22 -22
- data/ext/libxml/version.h +2 -2
- data/ext/libxml/version.h.rej +17 -0
- data/ext/mingw/Rakefile +41 -0
- data/{mingw → lib}/libiconv-2.dll +0 -0
- data/lib/libxml.rb +15 -4
- data/lib/libxml2-2.dll +0 -0
- data/lib/libxml_ruby.dll.a +0 -0
- data/lib/libxml_ruby.so +0 -0
- data/lib/xml.rb +14 -0
- data/lib/xml/libxml.rb +4 -1
- data/test/etc_doc_to_s.rb +1 -1
- data/test/ets_copy_bug.rb +1 -1
- data/test/ets_copy_bug3.rb +1 -1
- data/test/ets_doc_file.rb +1 -1
- data/test/ets_doc_to_s.rb +1 -1
- data/test/ets_node_gc.rb +1 -1
- data/test/ets_tsr.rb +1 -1
- data/test/model/shiporder.rnc +28 -0
- data/test/model/shiporder.rng +86 -0
- data/test/{tc_xml_attributes.rb → tc_attributes.rb} +1 -10
- data/test/{tc_xml_document.rb → tc_document.rb} +1 -1
- data/test/{tc_xml_document_write.rb → tc_document_write.rb} +1 -1
- data/test/{tc_xml_dtd.rb → tc_dtd.rb} +1 -1
- data/test/{tc_xml_html_parser.rb → tc_html_parser.rb} +1 -1
- data/test/{tc_xml_node.rb → tc_node.rb} +1 -1
- data/test/{tc_xml_node_attr.rb → tc_node_attr.rb} +1 -1
- data/test/{tc_xml_node_cdata.rb → tc_node_cdata.rb} +24 -5
- data/test/{tc_xml_node_comment.rb → tc_node_comment.rb} +1 -1
- data/test/{tc_xml_node_copy.rb → tc_node_copy.rb} +1 -1
- data/test/{tc_xml_node_edit.rb → tc_node_edit.rb} +1 -1
- data/test/{tc_xml_node_set.rb → tc_node_set.rb} +1 -1
- data/test/{tc_xml_node_set2.rb → tc_node_set2.rb} +1 -1
- data/test/{tc_xml_node_text.rb → tc_node_text.rb} +1 -1
- data/test/{tc_xml_node_xlink.rb → tc_node_xlink.rb} +2 -2
- data/test/{tc_xml_parser.rb → tc_parser.rb} +1 -1
- data/test/{tc_xml_parser_context.rb → tc_parser_context.rb} +1 -1
- data/test/{tc_xml_properties.rb → tc_properties.rb} +1 -7
- data/test/{tc_xml_reader.rb → tc_reader.rb} +1 -1
- data/test/tc_relaxng.rb +39 -0
- data/test/{tc_xml_sax_parser.rb → tc_sax_parser.rb} +1 -1
- data/test/{tc_xml_schema.rb → tc_schema.rb} +1 -1
- data/test/{tc_xml_traversal.rb → tc_traversal.rb} +1 -1
- data/test/{tc_xml_xinclude.rb → tc_xinclude.rb} +1 -1
- data/test/{tc_xml_xpath.rb → tc_xpath.rb} +1 -1
- data/test/{tc_xml_xpath_context.rb → tc_xpath_context.rb} +1 -1
- data/test/{tc_xml_xpointer.rb → tc_xpointer.rb} +1 -1
- data/test/test_suite.rb +26 -25
- metadata +103 -100
- data/benchmark/depixelate.rb +0 -632
- data/benchmark/hamlet.xml +0 -9055
- data/benchmark/sock_entries.xml +0 -507
- data/benchmark/throughput.rb +0 -39
- data/benchmark/xml_benchmarks.rb +0 -227
- data/mingw/libxml2-2.dll +0 -0
- data/mingw/libxml_ruby.so +0 -0
- data/test/gc.log +0 -0
- data/vc/libxml_ruby.sln +0 -20
- data/vc/libxml_ruby.vcproj +0 -389
data/CHANGES
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
(See log/ChangeLog for more detailed changes derived directly from source control.)
|
2
2
|
|
3
|
+
== 0.8.2 / 2008-07-21 Charlie Savage
|
4
|
+
|
5
|
+
* To use LibXML you can either require 'xml' or require 'libxml'.
|
6
|
+
The differences is that require 'xml' mixes the LibXML module into
|
7
|
+
the global namespace, thereby allowing you to write code such
|
8
|
+
as document = XML::Document.new. Note that this is different
|
9
|
+
from 0.8.0 and 0.8.1 and may require updating your code.
|
10
|
+
|
11
|
+
* Support RelaxNG validation (thanks to Morus Walter)
|
12
|
+
|
13
|
+
* Support passing IO objects to XmlReaders (thanks to Tom Hughes)
|
14
|
+
|
15
|
+
* Fix segmentation fault caused by adding an attribute to a CDATA node
|
16
|
+
|
17
|
+
* Moved node checking functions from C to Ruby
|
18
|
+
|
19
|
+
* Improved Windows support - libxml-ruby should now work out of the box.
|
20
|
+
|
21
|
+
* Improved Windows support - turned on libxml's zlib and iconv support.
|
22
|
+
|
23
|
+
|
3
24
|
== 0.8.1 / 2008-07-09 Charlie Savage
|
4
25
|
|
5
26
|
* Reimplmented Node#each_attr for backwards compatability
|
data/RAKEFILE
ADDED
@@ -0,0 +1,213 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Be sure to set ENV['RUBYFORGE_USERNAME'] to use publish.
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
require 'date'
|
7
|
+
require 'rake/gempackagetask'
|
8
|
+
require 'rake/rdoctask'
|
9
|
+
require 'rake/testtask'
|
10
|
+
require 'date'
|
11
|
+
|
12
|
+
|
13
|
+
# ------- Default Package ----------
|
14
|
+
FILES = FileList[
|
15
|
+
'RAKEFILE',
|
16
|
+
'README',
|
17
|
+
'LICENSE',
|
18
|
+
'CHANGES',
|
19
|
+
'setup.rb',
|
20
|
+
'doc/**/*',
|
21
|
+
'ext/libxml/*',
|
22
|
+
'ext/mingw/Rakefile',
|
23
|
+
'vc/*.sln',
|
24
|
+
'vc/*.vcproj',
|
25
|
+
'lib/**/*',
|
26
|
+
'benchmark/**/*',
|
27
|
+
'test/**/*'
|
28
|
+
]
|
29
|
+
|
30
|
+
# Default GEM Specification
|
31
|
+
default_spec = Gem::Specification.new do |spec|
|
32
|
+
spec.name = "libxml-ruby"
|
33
|
+
|
34
|
+
spec.homepage = "http://libxml.rubyforge.org/"
|
35
|
+
spec.summary = "Ruby libxml bindings"
|
36
|
+
spec.description = <<-EOF
|
37
|
+
The Libxml-Ruby project provides Ruby language bindings for the GNOME
|
38
|
+
Libxml2 XML toolkit. It is free software, released under the MIT License.
|
39
|
+
Libxml-ruby's primary advantage over REXML is performance - if speed
|
40
|
+
is your need, these are good libraries to consider, as demonstrated
|
41
|
+
by the informal benchmark below.
|
42
|
+
EOF
|
43
|
+
|
44
|
+
# Determine the current version of the software
|
45
|
+
spec.version =
|
46
|
+
if File.read('ext/libxml/version.h') =~ /\s*RUBY_LIBXML_VERSION\s*['"](\d.+)['"]/
|
47
|
+
CURRENT_VERSION = $1
|
48
|
+
else
|
49
|
+
CURRENT_VERSION = "0.0.0"
|
50
|
+
end
|
51
|
+
|
52
|
+
spec.author = "Charlie Savage"
|
53
|
+
spec.email = "libxml-devel@rubyforge.org"
|
54
|
+
spec.platform = Gem::Platform::RUBY
|
55
|
+
spec.require_paths = ["lib", "ext/libxml"]
|
56
|
+
spec.bindir = "bin"
|
57
|
+
spec.extensions = ["ext/libxml/extconf.rb"]
|
58
|
+
spec.files = FILES.to_a
|
59
|
+
spec.test_files = Dir.glob("test/tc_*.rb")
|
60
|
+
|
61
|
+
spec.required_ruby_version = '>= 1.8.4'
|
62
|
+
spec.date = DateTime.now
|
63
|
+
spec.rubyforge_project = 'libxml'
|
64
|
+
|
65
|
+
spec.has_rdoc = true
|
66
|
+
end
|
67
|
+
|
68
|
+
# Rake task to build the default package
|
69
|
+
Rake::GemPackageTask.new(default_spec) do |pkg|
|
70
|
+
pkg.package_dir = 'admin/pkg'
|
71
|
+
pkg.need_tar = true
|
72
|
+
pkg.need_zip = true
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
# ------- Windows Package ----------
|
77
|
+
|
78
|
+
# Use *.dll* to get import libraries
|
79
|
+
binaries = (FileList['ext/mingw/*.so',
|
80
|
+
'ext/mingw/*.dll*'])
|
81
|
+
|
82
|
+
# Windows specification
|
83
|
+
win_spec = default_spec.clone
|
84
|
+
win_spec.extensions = []
|
85
|
+
win_spec.platform = Gem::Platform::CURRENT
|
86
|
+
win_spec.files += binaries.map {|binaryname| "lib/#{File.basename(binaryname)}"}
|
87
|
+
|
88
|
+
|
89
|
+
desc "Create Windows Gem"
|
90
|
+
task :create_win32_gem do
|
91
|
+
# Copy the win32 extension built by MingW - easier to install
|
92
|
+
# since there are no dependencies of msvcr80.dll
|
93
|
+
current_dir = File.expand_path(File.dirname(__FILE__))
|
94
|
+
|
95
|
+
binaries.each do |binaryname|
|
96
|
+
target = File.join(current_dir, 'lib', File.basename(binaryname))
|
97
|
+
cp(binaryname, target)
|
98
|
+
end
|
99
|
+
|
100
|
+
# Create the gem, then move it to admin/pkg
|
101
|
+
Gem::Builder.new(win_spec).build
|
102
|
+
gem_file = "#{win_spec.name}-#{win_spec.version}-#{win_spec.platform}.gem"
|
103
|
+
mv(gem_file, "admin/pkg/#{gem_file}")
|
104
|
+
|
105
|
+
# Remove win extension from top level directory
|
106
|
+
binaries.each do |binaryname|
|
107
|
+
target = File.join(current_dir, 'lib', File.basename(binaryname))
|
108
|
+
rm(target)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
|
113
|
+
# --------- RDoc Documentation ---------
|
114
|
+
desc "Generate rdoc documentation"
|
115
|
+
Rake::RDocTask.new("rdoc") do |rdoc|
|
116
|
+
rdoc.rdoc_dir = 'doc/rdoc'
|
117
|
+
rdoc.title = "LibXML"
|
118
|
+
# Show source inline with line numbers
|
119
|
+
rdoc.options << "--inline-source" << "--line-numbers"
|
120
|
+
# Make the readme file the start page for the generated html
|
121
|
+
rdoc.options << '--main' << 'README'
|
122
|
+
rdoc.rdoc_files.include('doc/*.rdoc',
|
123
|
+
'ext/**/*.c',
|
124
|
+
'lib/**/*.rb',
|
125
|
+
'CHANGES',
|
126
|
+
'README',
|
127
|
+
'LICENSE',
|
128
|
+
'VERSION')
|
129
|
+
end
|
130
|
+
|
131
|
+
task :default => :package
|
132
|
+
task :package => :create_win32_gem
|
133
|
+
|
134
|
+
Rake::TestTask.new do |t|
|
135
|
+
t.libs << "test"
|
136
|
+
t.libs << "lib"
|
137
|
+
t.libs << "ext/libxml"
|
138
|
+
end
|
139
|
+
|
140
|
+
if not RUBY_PLATFORM.match(/mswin32/i)
|
141
|
+
Rake::Task[:test].prerequisites << :extensions
|
142
|
+
end
|
143
|
+
|
144
|
+
task :build => :extensions
|
145
|
+
task :extension => :build
|
146
|
+
|
147
|
+
ext = Config::CONFIG["DLEXT"]
|
148
|
+
task :extensions => ["ext/libxml/libxml_ruby.#{ext}"]
|
149
|
+
file "ext/libxml/libxml_ruby.#{ext}" =>
|
150
|
+
["ext/libxml/Makefile"] + FileList["ext/libxml/*.{c,h}"].to_a do |t|
|
151
|
+
Dir.chdir("ext/libxml") { sh "make" }
|
152
|
+
end
|
153
|
+
|
154
|
+
namespace :extensions do
|
155
|
+
task :clean do
|
156
|
+
Dir.chdir("ext/libxml") do
|
157
|
+
sh "rm -f Makefile"
|
158
|
+
sh "rm -f *.{o,so,bundle,log}"
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
file "ext/libxml/Makefile" => ["ext/libxml/extconf.rb"] do
|
164
|
+
|
165
|
+
command = ["ruby"] + $:.map{|dir| "-I#{File.expand_path dir}"} + ["extconf.rb"]
|
166
|
+
Dir.chdir("ext/libxml") { sh *command }
|
167
|
+
end
|
168
|
+
|
169
|
+
# --------- Publish Website to Rubyforge ---------
|
170
|
+
desc "publish website (uses rsync)"
|
171
|
+
task :publish => [:publish_website, :publish_rdoc]
|
172
|
+
|
173
|
+
task :publish_website do
|
174
|
+
unixname = 'libxml'
|
175
|
+
username = ENV['RUBYFORGE_USERNAME']
|
176
|
+
|
177
|
+
dir = 'admin/web'
|
178
|
+
url = "#{username}@rubyforge.org:/var/www/gforge-projects/#{unixname}"
|
179
|
+
|
180
|
+
dir = dir.chomp('/') + '/'
|
181
|
+
|
182
|
+
# Using commandline filter options didn't seem to work, so
|
183
|
+
# I opted for creating an .rsync_filter file for all cases.
|
184
|
+
|
185
|
+
protect = %w{usage statcvs statsvn robot.txt wiki}
|
186
|
+
exclude = %w{.svn}
|
187
|
+
|
188
|
+
rsync_file = File.join(dir,'.rsync-filter')
|
189
|
+
unless File.file?(rsync_file)
|
190
|
+
File.open(rsync_file, 'w') do |f|
|
191
|
+
exclude.each{|e| f << "- #{e}\n"}
|
192
|
+
protect.each{|e| f << "P #{e}\n"}
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
# maybe -p ?
|
197
|
+
cmd = "rsync -rLvz --delete-after --filter='dir-merge #{rsync_file}' #{dir} #{url}"
|
198
|
+
sh cmd
|
199
|
+
end
|
200
|
+
|
201
|
+
task :publish_rdoc do
|
202
|
+
unixname = 'libxml'
|
203
|
+
username = ENV['RUBYFORGE_USERNAME']
|
204
|
+
|
205
|
+
dir = 'doc/rdoc'
|
206
|
+
url = "#{username}@rubyforge.org:/var/www/gforge-projects/#{unixname}/rdoc"
|
207
|
+
|
208
|
+
dir = dir.chomp('/') + '/'
|
209
|
+
|
210
|
+
# maybe -p ?
|
211
|
+
cmd = "rsync -rLvz --delete-after #{dir} #{url}"
|
212
|
+
sh cmd
|
213
|
+
end
|
data/README
CHANGED
@@ -35,14 +35,14 @@ The easiest way to install libxml-ruby is via Ruby Gems. To install:
|
|
35
35
|
|
36
36
|
If you are running Windows, make sure to install the Win32 RubyGem which
|
37
37
|
includes an already built binary file. The binary is built against
|
38
|
-
libxml2 version 2.6.32 and iconv version 1.
|
38
|
+
libxml2 version 2.6.32 and iconv version 1.11. Both of these are also
|
39
39
|
included as pre-built binaries, and should be put either in the
|
40
40
|
libxml/lib directory or on the Windows path.
|
41
41
|
|
42
|
-
The Windows binaries are
|
43
|
-
|
44
|
-
|
45
|
-
you use VC++.
|
42
|
+
The Windows binaries are built with MingW and include libxml-ruby,
|
43
|
+
libxml2 and iconv. The gem also includes a Microsoft VC++ 2008
|
44
|
+
solution. If you wish to run a debug version of libxml-ruby on
|
45
|
+
Windows, then it is highly recommended you use VC++.
|
46
46
|
|
47
47
|
|
48
48
|
== Functionality
|
@@ -52,11 +52,13 @@ functionality such as:
|
|
52
52
|
|
53
53
|
* SAX
|
54
54
|
* DOM
|
55
|
+
* HTML Parsing
|
55
56
|
* XMLReader
|
56
57
|
* XPath
|
57
58
|
* XPointer
|
58
|
-
* XML Schema
|
59
59
|
* DTDs
|
60
|
+
* RelaxNG Schemas
|
61
|
+
* XML Schema
|
60
62
|
* XSLT (split into the libxslt-ruby bindings)
|
61
63
|
|
62
64
|
libxml-ruby provides impressive coverage of libxml's functionality
|
@@ -84,16 +86,35 @@ From https://svn.concord.org/svn/projects/trunk/common/ruby/xml_benchmarks/
|
|
84
86
|
rexml 22.859000 0.047000 22.906000 ( 23.203000)
|
85
87
|
|
86
88
|
== USAGE
|
87
|
-
|
88
89
|
For in-depth information about using libxml-ruby please refer
|
89
|
-
to its online Rdoc documentation.
|
90
|
-
|
90
|
+
to its online Rdoc documentation.
|
91
|
+
|
92
|
+
All libxml classes are in the LibXML::XML module. The simplest
|
93
|
+
way to use libxml is to require 'xml'. This will mixin the
|
94
|
+
LibXML module into the global namespace, allowing you to
|
95
|
+
write code like this:
|
96
|
+
|
97
|
+
require 'xml'
|
98
|
+
document = XML::Document.new
|
99
|
+
|
100
|
+
If you prefer not to add the LibXML module to the global namepace, then
|
101
|
+
write your code like this:
|
102
|
+
|
103
|
+
require 'libxml'
|
104
|
+
|
105
|
+
class MyClass
|
106
|
+
def some_method
|
107
|
+
document = LibXML::XML::Document.new
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
Some simple examples are shown below.
|
91
112
|
|
92
113
|
=== READING
|
93
114
|
|
94
115
|
There are several ways to read xml documents.
|
95
116
|
|
96
|
-
require '
|
117
|
+
require 'xml'
|
97
118
|
doc = XML::Document.file('output.xml')
|
98
119
|
root = doc.root
|
99
120
|
|
@@ -126,7 +147,7 @@ And your terminal should look like:
|
|
126
147
|
|
127
148
|
To write a simple document:
|
128
149
|
|
129
|
-
require '
|
150
|
+
require 'xml'
|
130
151
|
|
131
152
|
doc = XML::Document.new()
|
132
153
|
doc.root = XML::Node.new('root_node')
|
@@ -106,6 +106,10 @@
|
|
106
106
|
<a href="../files/ext/libxml/ruby_xml_reader_c.html">
|
107
107
|
ext/libxml/ruby_xml_reader.c
|
108
108
|
</a>
|
109
|
+
<br />
|
110
|
+
<a href="../files/ext/libxml/ruby_xml_relaxng_c.html">
|
111
|
+
ext/libxml/ruby_xml_relaxng.c
|
112
|
+
</a>
|
109
113
|
<br />
|
110
114
|
<a href="../files/ext/libxml/ruby_xml_sax_parser_c.html">
|
111
115
|
ext/libxml/ruby_xml_sax_parser.c
|
@@ -108,6 +108,12 @@
|
|
108
108
|
|
109
109
|
<div id="contextContent">
|
110
110
|
|
111
|
+
<div id="description">
|
112
|
+
<p>
|
113
|
+
Please see the LICENSE file for copyright and distribution information
|
114
|
+
</p>
|
115
|
+
|
116
|
+
</div>
|
111
117
|
|
112
118
|
|
113
119
|
</div>
|
@@ -136,6 +142,7 @@ Class <a href="XML/NS.html" class="link">LibXML::XML::NS</a><br />
|
|
136
142
|
Class <a href="XML/Node.html" class="link">LibXML::XML::Node</a><br />
|
137
143
|
Class <a href="XML/Parser.html" class="link">LibXML::XML::Parser</a><br />
|
138
144
|
Class <a href="XML/Reader.html" class="link">LibXML::XML::Reader</a><br />
|
145
|
+
Class <a href="XML/RelaxNG.html" class="link">LibXML::XML::RelaxNG</a><br />
|
139
146
|
Class <a href="XML/SaxParser.html" class="link">LibXML::XML::SaxParser</a><br />
|
140
147
|
Class <a href="XML/Schema.html" class="link">LibXML::XML::Schema</a><br />
|
141
148
|
Class <a href="XML/State.html" class="link">LibXML::XML::State</a><br />
|
@@ -85,13 +85,13 @@
|
|
85
85
|
<div id="description">
|
86
86
|
<p>
|
87
87
|
Provides access to an single element attribute. Accessed by calling <a
|
88
|
-
href="Node.html#
|
88
|
+
href="Node.html#M000132">XML::Node#attributes</a> method.
|
89
89
|
</p>
|
90
90
|
<p>
|
91
91
|
Basic Usage:
|
92
92
|
</p>
|
93
93
|
<pre>
|
94
|
-
require '
|
94
|
+
require 'xml'
|
95
95
|
|
96
96
|
doc = XML::Document.new(<some_file>)
|
97
97
|
attribute = doc.root.attributes.get_attribute_ns('http://www.w3.org/1999/xlink', 'href')
|
@@ -109,33 +109,33 @@ Basic Usage:
|
|
109
109
|
<h3 class="section-bar">Methods</h3>
|
110
110
|
|
111
111
|
<div class="name-list">
|
112
|
-
<a href="#
|
113
|
-
<a href="#
|
114
|
-
<a href="#
|
115
|
-
<a href="#
|
116
|
-
<a href="#
|
117
|
-
<a href="#
|
118
|
-
<a href="#
|
119
|
-
<a href="#
|
120
|
-
<a href="#
|
121
|
-
<a href="#
|
122
|
-
<a href="#
|
123
|
-
<a href="#
|
124
|
-
<a href="#
|
125
|
-
<a href="#
|
126
|
-
<a href="#
|
127
|
-
<a href="#
|
128
|
-
<a href="#
|
129
|
-
<a href="#
|
130
|
-
<a href="#
|
131
|
-
<a href="#
|
132
|
-
<a href="#
|
133
|
-
<a href="#
|
134
|
-
<a href="#
|
135
|
-
<a href="#
|
136
|
-
<a href="#
|
137
|
-
<a href="#
|
138
|
-
<a href="#
|
112
|
+
<a href="#M000240">child</a>
|
113
|
+
<a href="#M000241">child?</a>
|
114
|
+
<a href="#M000242">doc</a>
|
115
|
+
<a href="#M000243">doc?</a>
|
116
|
+
<a href="#M000262">each</a>
|
117
|
+
<a href="#M000261">each_attr</a>
|
118
|
+
<a href="#M000260">each_sibling</a>
|
119
|
+
<a href="#M000244">last</a>
|
120
|
+
<a href="#M000245">last?</a>
|
121
|
+
<a href="#M000246">name</a>
|
122
|
+
<a href="#M000239">new</a>
|
123
|
+
<a href="#M000247">next</a>
|
124
|
+
<a href="#M000248">next?</a>
|
125
|
+
<a href="#M000249">node_type_name</a>
|
126
|
+
<a href="#M000250">ns</a>
|
127
|
+
<a href="#M000251">ns?</a>
|
128
|
+
<a href="#M000252">parent</a>
|
129
|
+
<a href="#M000253">parent?</a>
|
130
|
+
<a href="#M000254">prev</a>
|
131
|
+
<a href="#M000255">prev?</a>
|
132
|
+
<a href="#M000256">remove!</a>
|
133
|
+
<a href="#M000259">siblings</a>
|
134
|
+
<a href="#M000264">to_a</a>
|
135
|
+
<a href="#M000263">to_h</a>
|
136
|
+
<a href="#M000265">to_s</a>
|
137
|
+
<a href="#M000257">value</a>
|
138
|
+
<a href="#M000258">value=</a>
|
139
139
|
</div>
|
140
140
|
</div>
|
141
141
|
|
@@ -164,11 +164,11 @@ Basic Usage:
|
|
164
164
|
<div id="methods">
|
165
165
|
<h3 class="section-bar">Public Class methods</h3>
|
166
166
|
|
167
|
-
<div id="method-
|
168
|
-
<a name="
|
167
|
+
<div id="method-M000239" class="method-detail">
|
168
|
+
<a name="M000239"></a>
|
169
169
|
|
170
170
|
<div class="method-heading">
|
171
|
-
<a href="#
|
171
|
+
<a href="#M000239" class="method-signature">
|
172
172
|
<span class="method-name">attr.initialize(node, "name", "value")<br />
|
173
173
|
</span>
|
174
174
|
</a>
|
@@ -176,18 +176,21 @@ Basic Usage:
|
|
176
176
|
|
177
177
|
<div class="method-description">
|
178
178
|
<p>
|
179
|
-
Creates a new attribute for the node.
|
179
|
+
Creates a <a href="Attr.html#M000239">new</a> attribute for the node.
|
180
180
|
</p>
|
181
181
|
<p>
|
182
182
|
node: The <a href="Node.html">XML::Node</a> that will contain the attribute
|
183
|
-
|
183
|
+
<a href="Attr.html#M000246">name</a>: The <a
|
184
|
+
href="Attr.html#M000246">name</a> of the attribute <a
|
185
|
+
href="Attr.html#M000257">value</a>: The <a
|
186
|
+
href="Attr.html#M000257">value</a> of the attribute
|
184
187
|
</p>
|
185
188
|
<pre>
|
186
189
|
attr = XML::Attr.new(doc.root, 'name', 'libxml')
|
187
190
|
</pre>
|
188
191
|
<p><a class="source-toggle" href="#"
|
189
|
-
onclick="toggleCode('
|
190
|
-
<div class="method-source-code" id="
|
192
|
+
onclick="toggleCode('M000239-source');return false;">[Source]</a></p>
|
193
|
+
<div class="method-source-code" id="M000239-source">
|
191
194
|
<pre>
|
192
195
|
/*
|
193
196
|
* call-seq:
|
@@ -211,11 +214,11 @@ ruby_xml_attr_initialize(int argc, VALUE *argv, VALUE self) {
|
|
211
214
|
|
212
215
|
<h3 class="section-bar">Public Instance methods</h3>
|
213
216
|
|
214
|
-
<div id="method-
|
215
|
-
<a name="
|
217
|
+
<div id="method-M000240" class="method-detail">
|
218
|
+
<a name="M000240"></a>
|
216
219
|
|
217
220
|
<div class="method-heading">
|
218
|
-
<a href="#
|
221
|
+
<a href="#M000240" class="method-signature">
|
219
222
|
<span class="method-name">attr.child → node<br />
|
220
223
|
</span>
|
221
224
|
</a>
|
@@ -223,11 +226,12 @@ ruby_xml_attr_initialize(int argc, VALUE *argv, VALUE self) {
|
|
223
226
|
|
224
227
|
<div class="method-description">
|
225
228
|
<p>
|
226
|
-
Obtain this attribute&#
|
229
|
+
Obtain this attribute‘s <a href="Attr.html#M000240">child</a>
|
230
|
+
attribute(s).
|
227
231
|
</p>
|
228
232
|
<p><a class="source-toggle" href="#"
|
229
|
-
onclick="toggleCode('
|
230
|
-
<div class="method-source-code" id="
|
233
|
+
onclick="toggleCode('M000240-source');return false;">[Source]</a></p>
|
234
|
+
<div class="method-source-code" id="M000240-source">
|
231
235
|
<pre>
|
232
236
|
/*
|
233
237
|
* call-seq:
|
@@ -243,11 +247,11 @@ ruby_xml_attr_child_get(VALUE self) {
|
|
243
247
|
</div>
|
244
248
|
</div>
|
245
249
|
|
246
|
-
<div id="method-
|
247
|
-
<a name="
|
250
|
+
<div id="method-M000241" class="method-detail">
|
251
|
+
<a name="M000241"></a>
|
248
252
|
|
249
253
|
<div class="method-heading">
|
250
|
-
<a href="#
|
254
|
+
<a href="#M000241" class="method-signature">
|
251
255
|
<span class="method-name">attr.child? → (true|false)<br />
|
252
256
|
</span>
|
253
257
|
</a>
|
@@ -255,11 +259,12 @@ ruby_xml_attr_child_get(VALUE self) {
|
|
255
259
|
|
256
260
|
<div class="method-description">
|
257
261
|
<p>
|
258
|
-
Determine whether this attribute has
|
262
|
+
Determine whether this attribute has <a href="Attr.html#M000240">child</a>
|
263
|
+
attributes.
|
259
264
|
</p>
|
260
265
|
<p><a class="source-toggle" href="#"
|
261
|
-
onclick="toggleCode('
|
262
|
-
<div class="method-source-code" id="
|
266
|
+
onclick="toggleCode('M000241-source');return false;">[Source]</a></p>
|
267
|
+
<div class="method-source-code" id="M000241-source">
|
263
268
|
<pre>
|
264
269
|
/*
|
265
270
|
* call-seq:
|
@@ -275,11 +280,11 @@ ruby_xml_attr_child_q(VALUE self) {
|
|
275
280
|
</div>
|
276
281
|
</div>
|
277
282
|
|
278
|
-
<div id="method-
|
279
|
-
<a name="
|
283
|
+
<div id="method-M000242" class="method-detail">
|
284
|
+
<a name="M000242"></a>
|
280
285
|
|
281
286
|
<div class="method-heading">
|
282
|
-
<a href="#
|
287
|
+
<a href="#M000242" class="method-signature">
|
283
288
|
<span class="method-name">attr.doc → XML::Document<br />
|
284
289
|
</span>
|
285
290
|
</a>
|
@@ -287,14 +292,14 @@ ruby_xml_attr_child_q(VALUE self) {
|
|
287
292
|
|
288
293
|
<div class="method-description">
|
289
294
|
<p>
|
290
|
-
Returns this attribute&#
|
295
|
+
Returns this attribute‘s document.
|
291
296
|
</p>
|
292
297
|
<pre>
|
293
298
|
doc.root.attributes.get_attribute('name').doc == doc
|
294
299
|
</pre>
|
295
300
|
<p><a class="source-toggle" href="#"
|
296
|
-
onclick="toggleCode('
|
297
|
-
<div class="method-source-code" id="
|
301
|
+
onclick="toggleCode('M000242-source');return false;">[Source]</a></p>
|
302
|
+
<div class="method-source-code" id="M000242-source">
|
298
303
|
<pre>
|
299
304
|
/*
|
300
305
|
* call-seq:
|
@@ -312,11 +317,11 @@ ruby_xml_attr_doc_get(VALUE self) {
|
|
312
317
|
</div>
|
313
318
|
</div>
|
314
319
|
|
315
|
-
<div id="method-
|
316
|
-
<a name="
|
320
|
+
<div id="method-M000243" class="method-detail">
|
321
|
+
<a name="M000243"></a>
|
317
322
|
|
318
323
|
<div class="method-heading">
|
319
|
-
<a href="#
|
324
|
+
<a href="#M000243" class="method-signature">
|
320
325
|
<span class="method-name">attr.doc? → (true|false)<br />
|
321
326
|
</span>
|
322
327
|
</a>
|
@@ -328,8 +333,8 @@ Determine whether this attribute is associated with an <a
|
|
328
333
|
href="Document.html">XML::Document</a>.
|
329
334
|
</p>
|
330
335
|
<p><a class="source-toggle" href="#"
|
331
|
-
onclick="toggleCode('
|
332
|
-
<div class="method-source-code" id="
|
336
|
+
onclick="toggleCode('M000243-source');return false;">[Source]</a></p>
|
337
|
+
<div class="method-source-code" id="M000243-source">
|
333
338
|
<pre>
|
334
339
|
/*
|
335
340
|
* call-seq:
|
@@ -346,8 +351,8 @@ ruby_xml_attr_doc_q(VALUE self) {
|
|
346
351
|
</div>
|
347
352
|
</div>
|
348
353
|
|
349
|
-
<div id="method-
|
350
|
-
<a name="
|
354
|
+
<div id="method-M000262" class="method-detail">
|
355
|
+
<a name="M000262"></a>
|
351
356
|
|
352
357
|
<div class="method-heading">
|
353
358
|
<span class="method-name">each</span><span class="method-args">(&blk)</span>
|
@@ -355,13 +360,13 @@ ruby_xml_attr_doc_q(VALUE self) {
|
|
355
360
|
|
356
361
|
<div class="method-description">
|
357
362
|
<p>
|
358
|
-
Alias for <a href="Attr.html#
|
363
|
+
Alias for <a href="Attr.html#M000260">each_sibling</a>
|
359
364
|
</p>
|
360
365
|
</div>
|
361
366
|
</div>
|
362
367
|
|
363
|
-
<div id="method-
|
364
|
-
<a name="
|
368
|
+
<div id="method-M000261" class="method-detail">
|
369
|
+
<a name="M000261"></a>
|
365
370
|
|
366
371
|
<div class="method-heading">
|
367
372
|
<span class="method-name">each_attr</span><span class="method-args">(&blk)</span>
|
@@ -369,24 +374,24 @@ Alias for <a href="Attr.html#M000257">each_sibling</a>
|
|
369
374
|
|
370
375
|
<div class="method-description">
|
371
376
|
<p>
|
372
|
-
Alias for <a href="Attr.html#
|
377
|
+
Alias for <a href="Attr.html#M000260">each_sibling</a>
|
373
378
|
</p>
|
374
379
|
</div>
|
375
380
|
</div>
|
376
381
|
|
377
|
-
<div id="method-
|
378
|
-
<a name="
|
382
|
+
<div id="method-M000260" class="method-detail">
|
383
|
+
<a name="M000260"></a>
|
379
384
|
|
380
385
|
<div class="method-heading">
|
381
|
-
<a href="#
|
386
|
+
<a href="#M000260" class="method-signature">
|
382
387
|
<span class="method-name">each_sibling</span><span class="method-args">(&blk)</span>
|
383
388
|
</a>
|
384
389
|
</div>
|
385
390
|
|
386
391
|
<div class="method-description">
|
387
392
|
<p><a class="source-toggle" href="#"
|
388
|
-
onclick="toggleCode('
|
389
|
-
<div class="method-source-code" id="
|
393
|
+
onclick="toggleCode('M000260-source');return false;">[Source]</a></p>
|
394
|
+
<div class="method-source-code" id="M000260-source">
|
390
395
|
<pre>
|
391
396
|
<span class="ruby-comment cmt"># File lib/libxml/attr.rb, line 19</span>
|
392
397
|
19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_sibling</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
@@ -397,11 +402,11 @@ Alias for <a href="Attr.html#M000257">each_sibling</a>
|
|
397
402
|
</div>
|
398
403
|
</div>
|
399
404
|
|
400
|
-
<div id="method-
|
401
|
-
<a name="
|
405
|
+
<div id="method-M000244" class="method-detail">
|
406
|
+
<a name="M000244"></a>
|
402
407
|
|
403
408
|
<div class="method-heading">
|
404
|
-
<a href="#
|
409
|
+
<a href="#M000244" class="method-signature">
|
405
410
|
<span class="method-name">attr.last → node<br />
|
406
411
|
</span>
|
407
412
|
</a>
|
@@ -409,11 +414,11 @@ Alias for <a href="Attr.html#M000257">each_sibling</a>
|
|
409
414
|
|
410
415
|
<div class="method-description">
|
411
416
|
<p>
|
412
|
-
Obtain the last attribute.
|
417
|
+
Obtain the <a href="Attr.html#M000244">last</a> attribute.
|
413
418
|
</p>
|
414
419
|
<p><a class="source-toggle" href="#"
|
415
|
-
onclick="toggleCode('
|
416
|
-
<div class="method-source-code" id="
|
420
|
+
onclick="toggleCode('M000244-source');return false;">[Source]</a></p>
|
421
|
+
<div class="method-source-code" id="M000244-source">
|
417
422
|
<pre>
|
418
423
|
/*
|
419
424
|
* call-seq:
|
@@ -429,11 +434,11 @@ ruby_xml_attr_last_get(VALUE self) {
|
|
429
434
|
</div>
|
430
435
|
</div>
|
431
436
|
|
432
|
-
<div id="method-
|
433
|
-
<a name="
|
437
|
+
<div id="method-M000245" class="method-detail">
|
438
|
+
<a name="M000245"></a>
|
434
439
|
|
435
440
|
<div class="method-heading">
|
436
|
-
<a href="#
|
441
|
+
<a href="#M000245" class="method-signature">
|
437
442
|
<span class="method-name">attr.last? → (true|false)<br />
|
438
443
|
</span>
|
439
444
|
</a>
|
@@ -441,11 +446,12 @@ ruby_xml_attr_last_get(VALUE self) {
|
|
441
446
|
|
442
447
|
<div class="method-description">
|
443
448
|
<p>
|
444
|
-
Determine whether this is the
|
449
|
+
Determine whether this is the <a href="Attr.html#M000244">last</a>
|
450
|
+
attribute.
|
445
451
|
</p>
|
446
452
|
<p><a class="source-toggle" href="#"
|
447
|
-
onclick="toggleCode('
|
448
|
-
<div class="method-source-code" id="
|
453
|
+
onclick="toggleCode('M000245-source');return false;">[Source]</a></p>
|
454
|
+
<div class="method-source-code" id="M000245-source">
|
449
455
|
<pre>
|
450
456
|
/*
|
451
457
|
* call-seq:
|
@@ -461,11 +467,11 @@ ruby_xml_attr_last_q(VALUE self) {
|
|
461
467
|
</div>
|
462
468
|
</div>
|
463
469
|
|
464
|
-
<div id="method-
|
465
|
-
<a name="
|
470
|
+
<div id="method-M000246" class="method-detail">
|
471
|
+
<a name="M000246"></a>
|
466
472
|
|
467
473
|
<div class="method-heading">
|
468
|
-
<a href="#
|
474
|
+
<a href="#M000246" class="method-signature">
|
469
475
|
<span class="method-name">attr.name → "name"<br />
|
470
476
|
</span>
|
471
477
|
</a>
|
@@ -473,11 +479,11 @@ ruby_xml_attr_last_q(VALUE self) {
|
|
473
479
|
|
474
480
|
<div class="method-description">
|
475
481
|
<p>
|
476
|
-
Obtain this attribute&#
|
482
|
+
Obtain this attribute‘s <a href="Attr.html#M000246">name</a>.
|
477
483
|
</p>
|
478
484
|
<p><a class="source-toggle" href="#"
|
479
|
-
onclick="toggleCode('
|
480
|
-
<div class="method-source-code" id="
|
485
|
+
onclick="toggleCode('M000246-source');return false;">[Source]</a></p>
|
486
|
+
<div class="method-source-code" id="M000246-source">
|
481
487
|
<pre>
|
482
488
|
/*
|
483
489
|
* call-seq:
|
@@ -493,11 +499,11 @@ ruby_xml_attr_name_get(VALUE self) {
|
|
493
499
|
</div>
|
494
500
|
</div>
|
495
501
|
|
496
|
-
<div id="method-
|
497
|
-
<a name="
|
502
|
+
<div id="method-M000247" class="method-detail">
|
503
|
+
<a name="M000247"></a>
|
498
504
|
|
499
505
|
<div class="method-heading">
|
500
|
-
<a href="#
|
506
|
+
<a href="#M000247" class="method-signature">
|
501
507
|
<span class="method-name">attr.next → node<br />
|
502
508
|
</span>
|
503
509
|
</a>
|
@@ -505,11 +511,11 @@ ruby_xml_attr_name_get(VALUE self) {
|
|
505
511
|
|
506
512
|
<div class="method-description">
|
507
513
|
<p>
|
508
|
-
Obtain the next attribute.
|
514
|
+
Obtain the <a href="Attr.html#M000247">next</a> attribute.
|
509
515
|
</p>
|
510
516
|
<p><a class="source-toggle" href="#"
|
511
|
-
onclick="toggleCode('
|
512
|
-
<div class="method-source-code" id="
|
517
|
+
onclick="toggleCode('M000247-source');return false;">[Source]</a></p>
|
518
|
+
<div class="method-source-code" id="M000247-source">
|
513
519
|
<pre>
|
514
520
|
/*
|
515
521
|
* call-seq:
|
@@ -525,11 +531,11 @@ ruby_xml_attr_next_get(VALUE self) {
|
|
525
531
|
</div>
|
526
532
|
</div>
|
527
533
|
|
528
|
-
<div id="method-
|
529
|
-
<a name="
|
534
|
+
<div id="method-M000248" class="method-detail">
|
535
|
+
<a name="M000248"></a>
|
530
536
|
|
531
537
|
<div class="method-heading">
|
532
|
-
<a href="#
|
538
|
+
<a href="#M000248" class="method-signature">
|
533
539
|
<span class="method-name">attr.next? → (true|false)<br />
|
534
540
|
</span>
|
535
541
|
</a>
|
@@ -537,11 +543,12 @@ ruby_xml_attr_next_get(VALUE self) {
|
|
537
543
|
|
538
544
|
<div class="method-description">
|
539
545
|
<p>
|
540
|
-
Determine whether there is a
|
546
|
+
Determine whether there is a <a href="Attr.html#M000247">next</a>
|
547
|
+
attribute.
|
541
548
|
</p>
|
542
549
|
<p><a class="source-toggle" href="#"
|
543
|
-
onclick="toggleCode('
|
544
|
-
<div class="method-source-code" id="
|
550
|
+
onclick="toggleCode('M000248-source');return false;">[Source]</a></p>
|
551
|
+
<div class="method-source-code" id="M000248-source">
|
545
552
|
<pre>
|
546
553
|
/*
|
547
554
|
* call-seq:
|
@@ -557,11 +564,11 @@ ruby_xml_attr_next_q(VALUE self) {
|
|
557
564
|
</div>
|
558
565
|
</div>
|
559
566
|
|
560
|
-
<div id="method-
|
561
|
-
<a name="
|
567
|
+
<div id="method-M000249" class="method-detail">
|
568
|
+
<a name="M000249"></a>
|
562
569
|
|
563
570
|
<div class="method-heading">
|
564
|
-
<a href="#
|
571
|
+
<a href="#M000249" class="method-signature">
|
565
572
|
<span class="method-name">attr.type_name → "attribute"<br />
|
566
573
|
</span>
|
567
574
|
</a>
|
@@ -569,11 +576,12 @@ ruby_xml_attr_next_q(VALUE self) {
|
|
569
576
|
|
570
577
|
<div class="method-description">
|
571
578
|
<p>
|
572
|
-
Obtain this attribute node&#
|
579
|
+
Obtain this attribute node‘s type <a
|
580
|
+
href="Attr.html#M000246">name</a>.
|
573
581
|
</p>
|
574
582
|
<p><a class="source-toggle" href="#"
|
575
|
-
onclick="toggleCode('
|
576
|
-
<div class="method-source-code" id="
|
583
|
+
onclick="toggleCode('M000249-source');return false;">[Source]</a></p>
|
584
|
+
<div class="method-source-code" id="M000249-source">
|
577
585
|
<pre>
|
578
586
|
/*
|
579
587
|
* call-seq:
|
@@ -589,11 +597,11 @@ ruby_xml_attr_node_type_name(VALUE self) {
|
|
589
597
|
</div>
|
590
598
|
</div>
|
591
599
|
|
592
|
-
<div id="method-
|
593
|
-
<a name="
|
600
|
+
<div id="method-M000250" class="method-detail">
|
601
|
+
<a name="M000250"></a>
|
594
602
|
|
595
603
|
<div class="method-heading">
|
596
|
-
<a href="#
|
604
|
+
<a href="#M000250" class="method-signature">
|
597
605
|
<span class="method-name">attr.ns → namespace<br />
|
598
606
|
</span>
|
599
607
|
</a>
|
@@ -601,12 +609,12 @@ ruby_xml_attr_node_type_name(VALUE self) {
|
|
601
609
|
|
602
610
|
<div class="method-description">
|
603
611
|
<p>
|
604
|
-
Obtain this attribute&#
|
612
|
+
Obtain this attribute‘s associated <a href="NS.html">XML::NS</a>, if
|
605
613
|
any.
|
606
614
|
</p>
|
607
615
|
<p><a class="source-toggle" href="#"
|
608
|
-
onclick="toggleCode('
|
609
|
-
<div class="method-source-code" id="
|
616
|
+
onclick="toggleCode('M000250-source');return false;">[Source]</a></p>
|
617
|
+
<div class="method-source-code" id="M000250-source">
|
610
618
|
<pre>
|
611
619
|
/*
|
612
620
|
* call-seq:
|
@@ -622,11 +630,11 @@ ruby_xml_attr_ns_get(VALUE self) {
|
|
622
630
|
</div>
|
623
631
|
</div>
|
624
632
|
|
625
|
-
<div id="method-
|
626
|
-
<a name="
|
633
|
+
<div id="method-M000251" class="method-detail">
|
634
|
+
<a name="M000251"></a>
|
627
635
|
|
628
636
|
<div class="method-heading">
|
629
|
-
<a href="#
|
637
|
+
<a href="#M000251" class="method-signature">
|
630
638
|
<span class="method-name">attr.ns? → (true|false)<br />
|
631
639
|
</span>
|
632
640
|
</a>
|
@@ -637,8 +645,8 @@ ruby_xml_attr_ns_get(VALUE self) {
|
|
637
645
|
Determine whether this attribute has an associated namespace.
|
638
646
|
</p>
|
639
647
|
<p><a class="source-toggle" href="#"
|
640
|
-
onclick="toggleCode('
|
641
|
-
<div class="method-source-code" id="
|
648
|
+
onclick="toggleCode('M000251-source');return false;">[Source]</a></p>
|
649
|
+
<div class="method-source-code" id="M000251-source">
|
642
650
|
<pre>
|
643
651
|
/*
|
644
652
|
* call-seq:
|
@@ -655,11 +663,11 @@ ruby_xml_attr_ns_q(VALUE self) {
|
|
655
663
|
</div>
|
656
664
|
</div>
|
657
665
|
|
658
|
-
<div id="method-
|
659
|
-
<a name="
|
666
|
+
<div id="method-M000252" class="method-detail">
|
667
|
+
<a name="M000252"></a>
|
660
668
|
|
661
669
|
<div class="method-heading">
|
662
|
-
<a href="#
|
670
|
+
<a href="#M000252" class="method-signature">
|
663
671
|
<span class="method-name">attr.parent → node<br />
|
664
672
|
</span>
|
665
673
|
</a>
|
@@ -667,11 +675,11 @@ ruby_xml_attr_ns_q(VALUE self) {
|
|
667
675
|
|
668
676
|
<div class="method-description">
|
669
677
|
<p>
|
670
|
-
Obtain this attribute node&#
|
678
|
+
Obtain this attribute node‘s <a href="Attr.html#M000252">parent</a>.
|
671
679
|
</p>
|
672
680
|
<p><a class="source-toggle" href="#"
|
673
|
-
onclick="toggleCode('
|
674
|
-
<div class="method-source-code" id="
|
681
|
+
onclick="toggleCode('M000252-source');return false;">[Source]</a></p>
|
682
|
+
<div class="method-source-code" id="M000252-source">
|
675
683
|
<pre>
|
676
684
|
/*
|
677
685
|
* call-seq:
|
@@ -687,11 +695,11 @@ ruby_xml_attr_parent_get(VALUE self) {
|
|
687
695
|
</div>
|
688
696
|
</div>
|
689
697
|
|
690
|
-
<div id="method-
|
691
|
-
<a name="
|
698
|
+
<div id="method-M000253" class="method-detail">
|
699
|
+
<a name="M000253"></a>
|
692
700
|
|
693
701
|
<div class="method-heading">
|
694
|
-
<a href="#
|
702
|
+
<a href="#M000253" class="method-signature">
|
695
703
|
<span class="method-name">attr.parent? → (true|false)<br />
|
696
704
|
</span>
|
697
705
|
</a>
|
@@ -699,11 +707,12 @@ ruby_xml_attr_parent_get(VALUE self) {
|
|
699
707
|
|
700
708
|
<div class="method-description">
|
701
709
|
<p>
|
702
|
-
Determine whether this attribute has a
|
710
|
+
Determine whether this attribute has a <a
|
711
|
+
href="Attr.html#M000252">parent</a>.
|
703
712
|
</p>
|
704
713
|
<p><a class="source-toggle" href="#"
|
705
|
-
onclick="toggleCode('
|
706
|
-
<div class="method-source-code" id="
|
714
|
+
onclick="toggleCode('M000253-source');return false;">[Source]</a></p>
|
715
|
+
<div class="method-source-code" id="M000253-source">
|
707
716
|
<pre>
|
708
717
|
/*
|
709
718
|
* call-seq:
|
@@ -719,11 +728,11 @@ ruby_xml_attr_parent_q(VALUE self) {
|
|
719
728
|
</div>
|
720
729
|
</div>
|
721
730
|
|
722
|
-
<div id="method-
|
723
|
-
<a name="
|
731
|
+
<div id="method-M000254" class="method-detail">
|
732
|
+
<a name="M000254"></a>
|
724
733
|
|
725
734
|
<div class="method-heading">
|
726
|
-
<a href="#
|
735
|
+
<a href="#M000254" class="method-signature">
|
727
736
|
<span class="method-name">attr.prev → node<br />
|
728
737
|
</span>
|
729
738
|
</a>
|
@@ -734,8 +743,8 @@ ruby_xml_attr_parent_q(VALUE self) {
|
|
734
743
|
Obtain the previous attribute.
|
735
744
|
</p>
|
736
745
|
<p><a class="source-toggle" href="#"
|
737
|
-
onclick="toggleCode('
|
738
|
-
<div class="method-source-code" id="
|
746
|
+
onclick="toggleCode('M000254-source');return false;">[Source]</a></p>
|
747
|
+
<div class="method-source-code" id="M000254-source">
|
739
748
|
<pre>
|
740
749
|
/*
|
741
750
|
* call-seq:
|
@@ -751,11 +760,11 @@ ruby_xml_attr_prev_get(VALUE self) {
|
|
751
760
|
</div>
|
752
761
|
</div>
|
753
762
|
|
754
|
-
<div id="method-
|
755
|
-
<a name="
|
763
|
+
<div id="method-M000255" class="method-detail">
|
764
|
+
<a name="M000255"></a>
|
756
765
|
|
757
766
|
<div class="method-heading">
|
758
|
-
<a href="#
|
767
|
+
<a href="#M000255" class="method-signature">
|
759
768
|
<span class="method-name">attr.prev? → (true|false)<br />
|
760
769
|
</span>
|
761
770
|
</a>
|
@@ -766,8 +775,8 @@ ruby_xml_attr_prev_get(VALUE self) {
|
|
766
775
|
Determine whether there is a previous attribute.
|
767
776
|
</p>
|
768
777
|
<p><a class="source-toggle" href="#"
|
769
|
-
onclick="toggleCode('
|
770
|
-
<div class="method-source-code" id="
|
778
|
+
onclick="toggleCode('M000255-source');return false;">[Source]</a></p>
|
779
|
+
<div class="method-source-code" id="M000255-source">
|
771
780
|
<pre>
|
772
781
|
/*
|
773
782
|
* call-seq:
|
@@ -783,11 +792,11 @@ ruby_xml_attr_prev_q(VALUE self) {
|
|
783
792
|
</div>
|
784
793
|
</div>
|
785
794
|
|
786
|
-
<div id="method-
|
787
|
-
<a name="
|
795
|
+
<div id="method-M000256" class="method-detail">
|
796
|
+
<a name="M000256"></a>
|
788
797
|
|
789
798
|
<div class="method-heading">
|
790
|
-
<a href="#
|
799
|
+
<a href="#M000256" class="method-signature">
|
791
800
|
<span class="method-name">node.remove! → nil<br />
|
792
801
|
</span>
|
793
802
|
</a>
|
@@ -795,11 +804,12 @@ ruby_xml_attr_prev_q(VALUE self) {
|
|
795
804
|
|
796
805
|
<div class="method-description">
|
797
806
|
<p>
|
798
|
-
Removes this attribute from it&#
|
807
|
+
Removes this attribute from it‘s <a
|
808
|
+
href="Attr.html#M000252">parent</a>.
|
799
809
|
</p>
|
800
810
|
<p><a class="source-toggle" href="#"
|
801
|
-
onclick="toggleCode('
|
802
|
-
<div class="method-source-code" id="
|
811
|
+
onclick="toggleCode('M000256-source');return false;">[Source]</a></p>
|
812
|
+
<div class="method-source-code" id="M000256-source">
|
803
813
|
<pre>
|
804
814
|
/*
|
805
815
|
* call-seq:
|
@@ -815,11 +825,11 @@ ruby_xml_attr_remove_ex(VALUE self) {
|
|
815
825
|
</div>
|
816
826
|
</div>
|
817
827
|
|
818
|
-
<div id="method-
|
819
|
-
<a name="
|
828
|
+
<div id="method-M000259" class="method-detail">
|
829
|
+
<a name="M000259"></a>
|
820
830
|
|
821
831
|
<div class="method-heading">
|
822
|
-
<a href="#
|
832
|
+
<a href="#M000259" class="method-signature">
|
823
833
|
<span class="method-name">siblings</span><span class="method-args">(node, &blk)</span>
|
824
834
|
</a>
|
825
835
|
</div>
|
@@ -829,8 +839,8 @@ ruby_xml_attr_remove_ex(VALUE self) {
|
|
829
839
|
Iterates nodes and attributes
|
830
840
|
</p>
|
831
841
|
<p><a class="source-toggle" href="#"
|
832
|
-
onclick="toggleCode('
|
833
|
-
<div class="method-source-code" id="
|
842
|
+
onclick="toggleCode('M000259-source');return false;">[Source]</a></p>
|
843
|
+
<div class="method-source-code" id="M000259-source">
|
834
844
|
<pre>
|
835
845
|
<span class="ruby-comment cmt"># File lib/libxml/attr.rb, line 10</span>
|
836
846
|
10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">siblings</span>(<span class="ruby-identifier">node</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
@@ -846,19 +856,19 @@ Iterates nodes and attributes
|
|
846
856
|
</div>
|
847
857
|
</div>
|
848
858
|
|
849
|
-
<div id="method-
|
850
|
-
<a name="
|
859
|
+
<div id="method-M000264" class="method-detail">
|
860
|
+
<a name="M000264"></a>
|
851
861
|
|
852
862
|
<div class="method-heading">
|
853
|
-
<a href="#
|
863
|
+
<a href="#M000264" class="method-signature">
|
854
864
|
<span class="method-name">to_a</span><span class="method-args">()</span>
|
855
865
|
</a>
|
856
866
|
</div>
|
857
867
|
|
858
868
|
<div class="method-description">
|
859
869
|
<p><a class="source-toggle" href="#"
|
860
|
-
onclick="toggleCode('
|
861
|
-
<div class="method-source-code" id="
|
870
|
+
onclick="toggleCode('M000264-source');return false;">[Source]</a></p>
|
871
|
+
<div class="method-source-code" id="M000264-source">
|
862
872
|
<pre>
|
863
873
|
<span class="ruby-comment cmt"># File lib/libxml/attr.rb, line 33</span>
|
864
874
|
33: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_a</span>
|
@@ -872,19 +882,19 @@ Iterates nodes and attributes
|
|
872
882
|
</div>
|
873
883
|
</div>
|
874
884
|
|
875
|
-
<div id="method-
|
876
|
-
<a name="
|
885
|
+
<div id="method-M000263" class="method-detail">
|
886
|
+
<a name="M000263"></a>
|
877
887
|
|
878
888
|
<div class="method-heading">
|
879
|
-
<a href="#
|
889
|
+
<a href="#M000263" class="method-signature">
|
880
890
|
<span class="method-name">to_h</span><span class="method-args">()</span>
|
881
891
|
</a>
|
882
892
|
</div>
|
883
893
|
|
884
894
|
<div class="method-description">
|
885
895
|
<p><a class="source-toggle" href="#"
|
886
|
-
onclick="toggleCode('
|
887
|
-
<div class="method-source-code" id="
|
896
|
+
onclick="toggleCode('M000263-source');return false;">[Source]</a></p>
|
897
|
+
<div class="method-source-code" id="M000263-source">
|
888
898
|
<pre>
|
889
899
|
<span class="ruby-comment cmt"># File lib/libxml/attr.rb, line 26</span>
|
890
900
|
26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h</span>
|
@@ -898,19 +908,19 @@ Iterates nodes and attributes
|
|
898
908
|
</div>
|
899
909
|
</div>
|
900
910
|
|
901
|
-
<div id="method-
|
902
|
-
<a name="
|
911
|
+
<div id="method-M000265" class="method-detail">
|
912
|
+
<a name="M000265"></a>
|
903
913
|
|
904
914
|
<div class="method-heading">
|
905
|
-
<a href="#
|
915
|
+
<a href="#M000265" class="method-signature">
|
906
916
|
<span class="method-name">to_s</span><span class="method-args">()</span>
|
907
917
|
</a>
|
908
918
|
</div>
|
909
919
|
|
910
920
|
<div class="method-description">
|
911
921
|
<p><a class="source-toggle" href="#"
|
912
|
-
onclick="toggleCode('
|
913
|
-
<div class="method-source-code" id="
|
922
|
+
onclick="toggleCode('M000265-source');return false;">[Source]</a></p>
|
923
|
+
<div class="method-source-code" id="M000265-source">
|
914
924
|
<pre>
|
915
925
|
<span class="ruby-comment cmt"># File lib/libxml/attr.rb, line 40</span>
|
916
926
|
40: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
@@ -921,11 +931,11 @@ Iterates nodes and attributes
|
|
921
931
|
</div>
|
922
932
|
</div>
|
923
933
|
|
924
|
-
<div id="method-
|
925
|
-
<a name="
|
934
|
+
<div id="method-M000257" class="method-detail">
|
935
|
+
<a name="M000257"></a>
|
926
936
|
|
927
937
|
<div class="method-heading">
|
928
|
-
<a href="#
|
938
|
+
<a href="#M000257" class="method-signature">
|
929
939
|
<span class="method-name">attr.value → "value"<br />
|
930
940
|
</span>
|
931
941
|
</a>
|
@@ -933,11 +943,11 @@ Iterates nodes and attributes
|
|
933
943
|
|
934
944
|
<div class="method-description">
|
935
945
|
<p>
|
936
|
-
Obtain the value of this attribute.
|
946
|
+
Obtain the <a href="Attr.html#M000257">value</a> of this attribute.
|
937
947
|
</p>
|
938
948
|
<p><a class="source-toggle" href="#"
|
939
|
-
onclick="toggleCode('
|
940
|
-
<div class="method-source-code" id="
|
949
|
+
onclick="toggleCode('M000257-source');return false;">[Source]</a></p>
|
950
|
+
<div class="method-source-code" id="M000257-source">
|
941
951
|
<pre>
|
942
952
|
/*
|
943
953
|
* call-seq:
|
@@ -953,11 +963,11 @@ ruby_xml_attr_value_get(VALUE self) {
|
|
953
963
|
</div>
|
954
964
|
</div>
|
955
965
|
|
956
|
-
<div id="method-
|
957
|
-
<a name="
|
966
|
+
<div id="method-M000258" class="method-detail">
|
967
|
+
<a name="M000258"></a>
|
958
968
|
|
959
969
|
<div class="method-heading">
|
960
|
-
<a href="#
|
970
|
+
<a href="#M000258" class="method-signature">
|
961
971
|
<span class="method-name">attr.value = "value"<br />
|
962
972
|
</span>
|
963
973
|
</a>
|
@@ -965,11 +975,11 @@ ruby_xml_attr_value_get(VALUE self) {
|
|
965
975
|
|
966
976
|
<div class="method-description">
|
967
977
|
<p>
|
968
|
-
Sets the value of this attribute.
|
978
|
+
Sets the <a href="Attr.html#M000257">value</a> of this attribute.
|
969
979
|
</p>
|
970
980
|
<p><a class="source-toggle" href="#"
|
971
|
-
onclick="toggleCode('
|
972
|
-
<div class="method-source-code" id="
|
981
|
+
onclick="toggleCode('M000258-source');return false;">[Source]</a></p>
|
982
|
+
<div class="method-source-code" id="M000258-source">
|
973
983
|
<pre>
|
974
984
|
/*
|
975
985
|
* call-seq:
|