nokogiri 1.6.6.4-x86-mingw32 → 1.6.7.rc2-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.cross_rubies +7 -5
- data/.travis.yml +33 -30
- data/CHANGELOG.ja.rdoc +15 -18
- data/CHANGELOG.rdoc +12 -15
- data/Gemfile +2 -1
- data/LICENSE.txt +31 -0
- data/Manifest.txt +4 -24
- data/README.md +170 -0
- data/Rakefile +24 -22
- data/appveyor.yml +22 -0
- data/build_all +6 -90
- data/ext/nokogiri/extconf.rb +29 -31
- data/ext/nokogiri/xml_node.c +21 -11
- data/lib/nokogiri/1.9/nokogiri.so +0 -0
- data/lib/nokogiri/2.0/nokogiri.so +0 -0
- data/lib/nokogiri/2.1/nokogiri.so +0 -0
- data/lib/nokogiri/2.2/nokogiri.so +0 -0
- data/lib/nokogiri/version.rb +1 -1
- data/lib/nokogiri/xml/node.rb +16 -0
- data/patches/sort-patches-by-date +25 -0
- data/test/html/test_document.rb +21 -3
- data/test/xml/sax/test_parser.rb +11 -0
- data/test/xml/test_document.rb +11 -0
- data/test_all +3 -3
- metadata +69 -48
- data/README.ja.rdoc +0 -112
- data/README.rdoc +0 -177
data/README.ja.rdoc
DELETED
@@ -1,112 +0,0 @@
|
|
1
|
-
= Nokogiri (鋸) {<img src="https://secure.travis-ci.org/sparklemotion/nokogiri.png?rvm=1.9.3" />}[http://travis-ci.org/sparklemotion/nokogiri] {<img src="https://codeclimate.com/badge.png" />}[https://codeclimate.com/github/sparklemotion/nokogiri]
|
2
|
-
|
3
|
-
* http://nokogiri.org
|
4
|
-
* https://github.com/sparklemotion/nokogiri
|
5
|
-
* https://groups.google.com/group/nokogiri-talk
|
6
|
-
* https://github.com/sparklemotion/nokogiri/issues
|
7
|
-
|
8
|
-
== DESCRIPTION:
|
9
|
-
|
10
|
-
Nokogiri はHTMLとXMLとSAXとXSLTとReaderのパーサーです。とりわけ重要な特徴は、
|
11
|
-
ドキュメントをXPathやCSS3セレクター経由で探索する機能を持つことです。
|
12
|
-
|
13
|
-
XMLは暴力に似ている - XMLが君の問題を解決しないとしたら、君はXMLを十分に
|
14
|
-
使いこなしていない事になる。
|
15
|
-
|
16
|
-
== FEATURES:
|
17
|
-
|
18
|
-
* XPath 1.0による探索
|
19
|
-
* CSS3 のセレクターによる探索
|
20
|
-
* XML/HTMLのビルダー
|
21
|
-
|
22
|
-
XML/HTMLの高速な解析と探索検索、ならびにCSS3セレクタとXPath 1.0をサポートしています。
|
23
|
-
|
24
|
-
== SUPPORT:
|
25
|
-
|
26
|
-
日本語でNokogiriの
|
27
|
-
{メーリングリスト}[https://groups.google.com/group/nokogiri-list]
|
28
|
-
|
29
|
-
* https://groups.google.com/group/nokogiri-list
|
30
|
-
|
31
|
-
{バグ報告}[https://github.com/sparklemotion/nokogiri/issues]
|
32
|
-
|
33
|
-
* https://github.com/sparklemotion/nokogiri/issues
|
34
|
-
|
35
|
-
IRCのチャンネルはfreenodeの #nokogiri です。
|
36
|
-
|
37
|
-
== SYNOPSIS:
|
38
|
-
|
39
|
-
require 'nokogiri'
|
40
|
-
require 'open-uri'
|
41
|
-
|
42
|
-
# Fetch and parse HTML document
|
43
|
-
doc = Nokogiri::HTML(open('http://www.nokogiri.org/tutorials/installing_nokogiri.html'))
|
44
|
-
|
45
|
-
####
|
46
|
-
# Search for nodes by css
|
47
|
-
doc.css('nav ul.menu li a').each do |link|
|
48
|
-
puts link.content
|
49
|
-
end
|
50
|
-
|
51
|
-
####
|
52
|
-
# Search for nodes by xpath
|
53
|
-
doc.xpath('//h2 | //h3').each do |link|
|
54
|
-
puts link.content
|
55
|
-
end
|
56
|
-
|
57
|
-
####
|
58
|
-
# Or mix and match.
|
59
|
-
doc.search('code.sh', '//h2').each do |link|
|
60
|
-
puts link.content
|
61
|
-
end
|
62
|
-
|
63
|
-
|
64
|
-
== REQUIREMENTS:
|
65
|
-
|
66
|
-
* ruby 1.9.3以上
|
67
|
-
|
68
|
-
* Nokogiri 1.6.0以降ではlibxml2とlibxsltは同梱されているが、
|
69
|
-
もしインストール済みのものを使いたい場合:
|
70
|
-
|
71
|
-
* libxml2 2.6.21以上, iconvサポート付きのもの
|
72
|
-
(libxml2-dev/-develパッケージも必要)
|
73
|
-
|
74
|
-
* libxslt 上記のlibxml2でビルドされ、サポートされているもの
|
75
|
-
(libxslt-dev/-develパッケージも必要)
|
76
|
-
|
77
|
-
== INSTALL:
|
78
|
-
|
79
|
-
* sudo gem install nokogiri
|
80
|
-
|
81
|
-
== LICENSE:
|
82
|
-
|
83
|
-
(The MIT License)
|
84
|
-
|
85
|
-
Copyright (c) 2008 - 2015:
|
86
|
-
|
87
|
-
* {Aaron Patterson}[http://tenderlovemaking.com]
|
88
|
-
* {Mike Dalessio}[http://mike.daless.io]
|
89
|
-
* {Charles Nutter}[http://blog.headius.com]
|
90
|
-
* {Sergio Arbeo}[http://www.serabe.com]
|
91
|
-
* {Patrick Mahoney}[http://polycrystal.org]
|
92
|
-
* {Yoko Harada}[http://yokolet.blogspot.com]
|
93
|
-
* {Akinori MUSHA}[https://akinori.org]
|
94
|
-
|
95
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
96
|
-
a copy of this software and associated documentation files (the
|
97
|
-
'Software'), to deal in the Software without restriction, including
|
98
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
99
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
100
|
-
permit persons to whom the Software is furnished to do so, subject to
|
101
|
-
the following conditions:
|
102
|
-
|
103
|
-
The above copyright notice and this permission notice shall be
|
104
|
-
included in all copies or substantial portions of the Software.
|
105
|
-
|
106
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
107
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
108
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
109
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
110
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
111
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
112
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
DELETED
@@ -1,177 +0,0 @@
|
|
1
|
-
= Nokogiri {<img src="https://secure.travis-ci.org/sparklemotion/nokogiri.png?rvm=1.9.3" />}[http://travis-ci.org/sparklemotion/nokogiri] {<img src="https://codeclimate.com/github/sparklemotion/nokogiri.png" />}[https://codeclimate.com/github/sparklemotion/nokogiri] {<img src="https://www.versioneye.com/ruby/nokogiri/badge.png" alt="Dependency Status" />}[https://www.versioneye.com/ruby/nokogiri]
|
2
|
-
|
3
|
-
* http://nokogiri.org
|
4
|
-
* https://github.com/sparklemotion/nokogiri
|
5
|
-
* https://groups.google.com/group/nokogiri-talk
|
6
|
-
* https://github.com/sparklemotion/nokogiri/issues
|
7
|
-
|
8
|
-
== DESCRIPTION:
|
9
|
-
|
10
|
-
Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's
|
11
|
-
many features is the ability to search documents via XPath or CSS3 selectors.
|
12
|
-
|
13
|
-
XML is like violence - if it doesn’t solve your problems, you are not using
|
14
|
-
enough of it.
|
15
|
-
|
16
|
-
== FEATURES:
|
17
|
-
|
18
|
-
* XPath 1.0 support for document searching
|
19
|
-
* CSS3 selector support for document searching
|
20
|
-
* XML/HTML builder
|
21
|
-
|
22
|
-
Nokogiri parses and searches XML/HTML very quickly, and also has
|
23
|
-
correctly implemented CSS3 selector support as well as XPath 1.0 support.
|
24
|
-
|
25
|
-
== SUPPORT:
|
26
|
-
|
27
|
-
Before filing a bug report, please read our {submission guidelines}[http://nokogiri.org/tutorials/getting_help.html] at:
|
28
|
-
|
29
|
-
* http://nokogiri.org/tutorials/getting_help.html
|
30
|
-
|
31
|
-
The Nokogiri {mailing list}[https://groups.google.com/group/nokogiri-talk]
|
32
|
-
is available here:
|
33
|
-
|
34
|
-
* https://groups.google.com/group/nokogiri-talk
|
35
|
-
|
36
|
-
The {bug tracker}[https://github.com/sparklemotion/nokogiri/issues]
|
37
|
-
is available here:
|
38
|
-
|
39
|
-
* https://github.com/sparklemotion/nokogiri/issues
|
40
|
-
|
41
|
-
The IRC channel is #nokogiri on freenode.
|
42
|
-
|
43
|
-
== SYNOPSIS:
|
44
|
-
|
45
|
-
require 'nokogiri'
|
46
|
-
require 'open-uri'
|
47
|
-
|
48
|
-
# Fetch and parse HTML document
|
49
|
-
doc = Nokogiri::HTML(open('http://www.nokogiri.org/tutorials/installing_nokogiri.html'))
|
50
|
-
|
51
|
-
####
|
52
|
-
# Search for nodes by css
|
53
|
-
doc.css('nav ul.menu li a').each do |link|
|
54
|
-
puts link.content
|
55
|
-
end
|
56
|
-
|
57
|
-
####
|
58
|
-
# Search for nodes by xpath
|
59
|
-
doc.xpath('//h2 | //h3').each do |link|
|
60
|
-
puts link.content
|
61
|
-
end
|
62
|
-
|
63
|
-
####
|
64
|
-
# Or mix and match.
|
65
|
-
doc.search('code.sh', '//h2').each do |link|
|
66
|
-
puts link.content
|
67
|
-
end
|
68
|
-
|
69
|
-
|
70
|
-
== REQUIREMENTS:
|
71
|
-
|
72
|
-
* ruby 1.9.3 or higher
|
73
|
-
|
74
|
-
* in Nokogiri 1.6.0 and later libxml2 and libxslt are bundled with the
|
75
|
-
gem, but if you want to use them installed on the system:
|
76
|
-
|
77
|
-
* libxml2 >=2.6.21 with iconv support
|
78
|
-
(libxml2-dev/-devel is required too)
|
79
|
-
|
80
|
-
* libxslt, built with and supported by the given libxml2
|
81
|
-
(libxslt-dev/-devel is required too)
|
82
|
-
|
83
|
-
== ENCODING:
|
84
|
-
|
85
|
-
Strings are always stored as UTF-8 internally. Methods that return
|
86
|
-
text values will always return UTF-8 encoded strings. Methods that
|
87
|
-
return XML (like to_xml, to_html and inner_html) will return a string
|
88
|
-
encoded like the source document.
|
89
|
-
|
90
|
-
*WARNING*
|
91
|
-
|
92
|
-
Some documents declare one particular encoding, but use a different
|
93
|
-
one. So, which encoding should the parser choose?
|
94
|
-
|
95
|
-
Remember that data is just a stream of bytes. Only we humans add
|
96
|
-
meaning to that stream. Any particular set of bytes could be valid
|
97
|
-
characters in multiple encodings, so detecting encoding with 100%
|
98
|
-
accuracy is not possible. libxml2 does its best, but it can't be right
|
99
|
-
100% of the time.
|
100
|
-
|
101
|
-
If you want Nokogiri to handle the document encoding properly, your
|
102
|
-
best bet is to explicitly set the encoding. Here is an example of
|
103
|
-
explicitly setting the encoding to EUC-JP on the parser:
|
104
|
-
|
105
|
-
doc = Nokogiri.XML('<foo><bar /><foo>', nil, 'EUC-JP')
|
106
|
-
|
107
|
-
== INSTALL:
|
108
|
-
|
109
|
-
* sudo gem install nokogiri
|
110
|
-
|
111
|
-
=== Binary packages
|
112
|
-
|
113
|
-
Binary packages are available for:
|
114
|
-
|
115
|
-
* SuSE[https://download.opensuse.org/repositories/devel:/languages:/ruby:/extensions/]
|
116
|
-
* Fedora[http://s390.koji.fedoraproject.org/koji/packageinfo?packageID=6756]
|
117
|
-
|
118
|
-
== DEVELOPMENT:
|
119
|
-
|
120
|
-
=== Developing on C Ruby (MRI)
|
121
|
-
|
122
|
-
Developing Nokogiri requires racc and rexical to generate the parser and
|
123
|
-
tokenizer. To start development, make sure you have `libxml2` and `libxslt`
|
124
|
-
installed.
|
125
|
-
|
126
|
-
Then install core gems and bootstrap:
|
127
|
-
|
128
|
-
$ gem install hoe rake-compiler mini_portile
|
129
|
-
$ rake newb
|
130
|
-
|
131
|
-
=== Developing on JRuby
|
132
|
-
|
133
|
-
Currently, development with JRuby depends on CRuby being installed. With
|
134
|
-
CRuby, install racc and rexical:
|
135
|
-
|
136
|
-
$ gem install racc rexical
|
137
|
-
|
138
|
-
Make sure hoe and rake compiler are installed with JRuby:
|
139
|
-
|
140
|
-
$ jgem install hoe rake-compiler
|
141
|
-
|
142
|
-
Then run rake:
|
143
|
-
|
144
|
-
$ jruby -S rake
|
145
|
-
|
146
|
-
== LICENSE:
|
147
|
-
|
148
|
-
(The MIT License)
|
149
|
-
|
150
|
-
Copyright (c) 2008 - 2015:
|
151
|
-
|
152
|
-
* {Aaron Patterson}[http://tenderlovemaking.com]
|
153
|
-
* {Mike Dalessio}[http://mike.daless.io]
|
154
|
-
* {Charles Nutter}[http://blog.headius.com]
|
155
|
-
* {Sergio Arbeo}[http://www.serabe.com]
|
156
|
-
* {Patrick Mahoney}[http://polycrystal.org]
|
157
|
-
* {Yoko Harada}[http://yokolet.blogspot.com]
|
158
|
-
* {Akinori MUSHA}[https://akinori.org]
|
159
|
-
|
160
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
161
|
-
a copy of this software and associated documentation files (the
|
162
|
-
'Software'), to deal in the Software without restriction, including
|
163
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
164
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
165
|
-
permit persons to whom the Software is furnished to do so, subject to
|
166
|
-
the following conditions:
|
167
|
-
|
168
|
-
The above copyright notice and this permission notice shall be
|
169
|
-
included in all copies or substantial portions of the Software.
|
170
|
-
|
171
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
172
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
173
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
174
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
175
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
176
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
177
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|