nokogiri 1.1.1-java

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.

Files changed (142) hide show
  1. data/History.ja.txt +99 -0
  2. data/History.txt +99 -0
  3. data/Manifest.txt +141 -0
  4. data/README.ja.txt +100 -0
  5. data/README.txt +109 -0
  6. data/Rakefile +354 -0
  7. data/ext/nokogiri/extconf.rb +93 -0
  8. data/ext/nokogiri/html_document.c +86 -0
  9. data/ext/nokogiri/html_document.h +10 -0
  10. data/ext/nokogiri/html_sax_parser.c +36 -0
  11. data/ext/nokogiri/html_sax_parser.h +11 -0
  12. data/ext/nokogiri/native.c +41 -0
  13. data/ext/nokogiri/native.h +50 -0
  14. data/ext/nokogiri/xml_cdata.c +44 -0
  15. data/ext/nokogiri/xml_cdata.h +9 -0
  16. data/ext/nokogiri/xml_comment.c +42 -0
  17. data/ext/nokogiri/xml_comment.h +9 -0
  18. data/ext/nokogiri/xml_document.c +206 -0
  19. data/ext/nokogiri/xml_document.h +10 -0
  20. data/ext/nokogiri/xml_dtd.c +121 -0
  21. data/ext/nokogiri/xml_dtd.h +8 -0
  22. data/ext/nokogiri/xml_io.c +17 -0
  23. data/ext/nokogiri/xml_io.h +9 -0
  24. data/ext/nokogiri/xml_node.c +727 -0
  25. data/ext/nokogiri/xml_node.h +13 -0
  26. data/ext/nokogiri/xml_node_set.c +118 -0
  27. data/ext/nokogiri/xml_node_set.h +9 -0
  28. data/ext/nokogiri/xml_reader.c +465 -0
  29. data/ext/nokogiri/xml_reader.h +10 -0
  30. data/ext/nokogiri/xml_sax_parser.c +201 -0
  31. data/ext/nokogiri/xml_sax_parser.h +10 -0
  32. data/ext/nokogiri/xml_syntax_error.c +199 -0
  33. data/ext/nokogiri/xml_syntax_error.h +11 -0
  34. data/ext/nokogiri/xml_text.c +40 -0
  35. data/ext/nokogiri/xml_text.h +9 -0
  36. data/ext/nokogiri/xml_xpath.c +53 -0
  37. data/ext/nokogiri/xml_xpath.h +11 -0
  38. data/ext/nokogiri/xml_xpath_context.c +214 -0
  39. data/ext/nokogiri/xml_xpath_context.h +9 -0
  40. data/ext/nokogiri/xslt_stylesheet.c +123 -0
  41. data/ext/nokogiri/xslt_stylesheet.h +9 -0
  42. data/lib/action-nokogiri.rb +30 -0
  43. data/lib/nokogiri.rb +72 -0
  44. data/lib/nokogiri/css.rb +25 -0
  45. data/lib/nokogiri/css/generated_parser.rb +721 -0
  46. data/lib/nokogiri/css/generated_tokenizer.rb +159 -0
  47. data/lib/nokogiri/css/node.rb +97 -0
  48. data/lib/nokogiri/css/parser.rb +64 -0
  49. data/lib/nokogiri/css/parser.y +216 -0
  50. data/lib/nokogiri/css/syntax_error.rb +6 -0
  51. data/lib/nokogiri/css/tokenizer.rb +9 -0
  52. data/lib/nokogiri/css/tokenizer.rex +63 -0
  53. data/lib/nokogiri/css/xpath_visitor.rb +168 -0
  54. data/lib/nokogiri/decorators.rb +2 -0
  55. data/lib/nokogiri/decorators/hpricot.rb +3 -0
  56. data/lib/nokogiri/decorators/hpricot/node.rb +56 -0
  57. data/lib/nokogiri/decorators/hpricot/node_set.rb +54 -0
  58. data/lib/nokogiri/decorators/hpricot/xpath_visitor.rb +28 -0
  59. data/lib/nokogiri/decorators/slop.rb +31 -0
  60. data/lib/nokogiri/hpricot.rb +51 -0
  61. data/lib/nokogiri/html.rb +105 -0
  62. data/lib/nokogiri/html/builder.rb +9 -0
  63. data/lib/nokogiri/html/document.rb +9 -0
  64. data/lib/nokogiri/html/sax/parser.rb +21 -0
  65. data/lib/nokogiri/version.rb +3 -0
  66. data/lib/nokogiri/xml.rb +83 -0
  67. data/lib/nokogiri/xml/after_handler.rb +18 -0
  68. data/lib/nokogiri/xml/attr.rb +10 -0
  69. data/lib/nokogiri/xml/before_handler.rb +33 -0
  70. data/lib/nokogiri/xml/builder.rb +84 -0
  71. data/lib/nokogiri/xml/cdata.rb +9 -0
  72. data/lib/nokogiri/xml/comment.rb +6 -0
  73. data/lib/nokogiri/xml/document.rb +55 -0
  74. data/lib/nokogiri/xml/dtd.rb +6 -0
  75. data/lib/nokogiri/xml/element.rb +6 -0
  76. data/lib/nokogiri/xml/entity_declaration.rb +9 -0
  77. data/lib/nokogiri/xml/node.rb +333 -0
  78. data/lib/nokogiri/xml/node_set.rb +197 -0
  79. data/lib/nokogiri/xml/notation.rb +6 -0
  80. data/lib/nokogiri/xml/reader.rb +20 -0
  81. data/lib/nokogiri/xml/sax.rb +9 -0
  82. data/lib/nokogiri/xml/sax/document.rb +59 -0
  83. data/lib/nokogiri/xml/sax/parser.rb +37 -0
  84. data/lib/nokogiri/xml/syntax_error.rb +21 -0
  85. data/lib/nokogiri/xml/text.rb +6 -0
  86. data/lib/nokogiri/xml/xpath.rb +10 -0
  87. data/lib/nokogiri/xml/xpath/syntax_error.rb +8 -0
  88. data/lib/nokogiri/xml/xpath_context.rb +14 -0
  89. data/lib/nokogiri/xslt.rb +28 -0
  90. data/lib/nokogiri/xslt/stylesheet.rb +6 -0
  91. data/test/css/test_nthiness.rb +159 -0
  92. data/test/css/test_parser.rb +237 -0
  93. data/test/css/test_tokenizer.rb +162 -0
  94. data/test/css/test_xpath_visitor.rb +64 -0
  95. data/test/files/dont_hurt_em_why.xml +422 -0
  96. data/test/files/exslt.xml +8 -0
  97. data/test/files/exslt.xslt +35 -0
  98. data/test/files/staff.xml +59 -0
  99. data/test/files/staff.xslt +32 -0
  100. data/test/files/tlm.html +850 -0
  101. data/test/helper.rb +78 -0
  102. data/test/hpricot/files/basic.xhtml +17 -0
  103. data/test/hpricot/files/boingboing.html +2266 -0
  104. data/test/hpricot/files/cy0.html +3653 -0
  105. data/test/hpricot/files/immob.html +400 -0
  106. data/test/hpricot/files/pace_application.html +1320 -0
  107. data/test/hpricot/files/tenderlove.html +16 -0
  108. data/test/hpricot/files/uswebgen.html +220 -0
  109. data/test/hpricot/files/utf8.html +1054 -0
  110. data/test/hpricot/files/week9.html +1723 -0
  111. data/test/hpricot/files/why.xml +19 -0
  112. data/test/hpricot/load_files.rb +11 -0
  113. data/test/hpricot/test_alter.rb +67 -0
  114. data/test/hpricot/test_builder.rb +27 -0
  115. data/test/hpricot/test_parser.rb +426 -0
  116. data/test/hpricot/test_paths.rb +15 -0
  117. data/test/hpricot/test_preserved.rb +77 -0
  118. data/test/hpricot/test_xml.rb +30 -0
  119. data/test/html/sax/test_parser.rb +27 -0
  120. data/test/html/test_builder.rb +89 -0
  121. data/test/html/test_document.rb +150 -0
  122. data/test/html/test_node.rb +21 -0
  123. data/test/test_convert_xpath.rb +185 -0
  124. data/test/test_css_cache.rb +57 -0
  125. data/test/test_gc.rb +15 -0
  126. data/test/test_memory_leak.rb +38 -0
  127. data/test/test_nokogiri.rb +97 -0
  128. data/test/test_reader.rb +222 -0
  129. data/test/test_xslt_transforms.rb +93 -0
  130. data/test/xml/sax/test_parser.rb +95 -0
  131. data/test/xml/test_attr.rb +15 -0
  132. data/test/xml/test_builder.rb +16 -0
  133. data/test/xml/test_cdata.rb +18 -0
  134. data/test/xml/test_comment.rb +16 -0
  135. data/test/xml/test_document.rb +195 -0
  136. data/test/xml/test_dtd.rb +43 -0
  137. data/test/xml/test_node.rb +394 -0
  138. data/test/xml/test_node_set.rb +143 -0
  139. data/test/xml/test_text.rb +13 -0
  140. data/test/xml/test_xpath.rb +105 -0
  141. data/vendor/hoe.rb +1020 -0
  142. metadata +233 -0
@@ -0,0 +1,99 @@
1
+ === 1.1.1
2
+
3
+ * 新しい機能
4
+ * XML::Node#elem? を追加
5
+ * XML::Node#attribute_nodes を追加
6
+ * XML::Attr を追加
7
+ * XML::Node#delete を追加
8
+ * XML::NodeSet#inner_html を追加
9
+
10
+ * バグの修正
11
+
12
+ * HTML のノードを \r のエンティティを含まない
13
+ * CSS::SelectorHandler と XML::XPathHandler を除去
14
+ * XML::Node#attributes が Attr node を value値に返す
15
+ * XML::NodeSet が to_xml へ実行
16
+
17
+ === 1.1.0
18
+
19
+ * 新しい機能
20
+
21
+ * カスタム XPath 機能はある。( Nokogiri::XML::Node#xpath 参照 )
22
+ * カスタム CSS 擬似クラスと機能はある。( Nokogiri::XML::Node#css 参照 )
23
+ * Nokogiri::XML::Node#<< が作成中に子ノードを自動追加
24
+
25
+ * バグの修正
26
+
27
+ * mutex が CSS のキャッシュのアクセスをロックする
28
+ * GCC 3.3.5 のビルドに関する問題を修正
29
+ * XML::Node#to_xml が引数indentationを取る
30
+ * XML::Node#dup が引数任意のdepthを取る
31
+ * XML::Node#add_previous_sibling が新しい兄弟ノードで返す
32
+
33
+ === 1.0.7
34
+
35
+ * バグの修正
36
+
37
+ * Dike 使用時中のメモリーリークの修正
38
+ * SAX パーサーが現在 IO Stream 同時解析
39
+ * コメント nodes が独自のクラスを継承する
40
+ * Nokogiri() は Nokogiri.parse() へデリゲートする
41
+ * ENV['PATH'] に付加せれる代わりに先頭へデータ挿入される
42
+ * 複雑な CSS 内のバグを修正完了 :not selector ではありません
43
+
44
+ === 1.0.6
45
+
46
+ * 5つの修正
47
+
48
+ * XPath のパーサーが SyntaxError を生じさせ解析停止させる
49
+ * CSS のパーサーが SyntaxError を生じさせ解析停止させる
50
+ * filter() と not() hpricot の互換性を追加
51
+ * CSS が Node#search 経由で検索し、常時対応する事が出来るようになった
52
+ * CSS より XPath 変換がキャッシュに入れられるようになった
53
+
54
+ === 1.0.5
55
+
56
+ * バグフィックス
57
+
58
+ * メーリンクリストを作成
59
+ * バグファイルを作成
60
+ * Windows 内で ENV['PATH'] が存在しない場合でも、存在出来るように設定完了
61
+ * Document 内の NodeSet#[] の結果をキャッシュする
62
+
63
+ === 1.0.4
64
+
65
+ * バグフィックス
66
+
67
+ * 弱参照からドキュメント参照へのメモリー管理の変換
68
+ * メモリリークに接続
69
+ * ビルダーブロックが取り囲んでいるコンテキストから
70
+ メソッドの呼び出しをする事が出来る
71
+
72
+ === 1.0.3
73
+
74
+ * 5つのバグ修正
75
+
76
+ * NodeSet が to_ary へ実行
77
+ * XML::Document#parent を除去
78
+ * GCバグ修正済み (Mike は最高!)
79
+ * 1.8.5互換性の為の RARRAY_LEN 除去
80
+ * inner_html 修正済み (Yahuda に感謝)
81
+
82
+ === 1.0.2
83
+
84
+ * 1つのバグ修正
85
+
86
+ * extconf.rb は frex や racc を調べないはず
87
+
88
+ === 1.0.1
89
+
90
+ * 1つのバグ修正
91
+
92
+ * extconf.rb が libdir や prefix を検索しない事を確認済み
93
+ それによって、ports libxml/ruby が正しくリンクする (lucsky に感謝!)
94
+
95
+ === 1.0.0 / 2008-07-13
96
+
97
+ * 1つの偉大な増進
98
+
99
+ * ご誕生である
@@ -0,0 +1,99 @@
1
+ === 1.1.1
2
+
3
+ * New features
4
+
5
+ * Added XML::Node#elem?
6
+ * Added XML::Node#attribute_nodes
7
+ * Added XML::Attr
8
+ * XML::Node#delete added.
9
+ * XML::NodeSet#inner_html added.
10
+
11
+ * Bugfixes
12
+
13
+ * Not including an HTML entity for \r for HTML nodes.
14
+ * Removed CSS::SelectorHandler and XML::XPathHandler
15
+ * XML::Node#attributes returns an Attr node for the value.
16
+ * XML::NodeSet implements to_xml
17
+
18
+ === 1.1.0
19
+
20
+ * New Features
21
+
22
+ * Custom XPath functions are now supported. See Nokogiri::XML::Node#xpath
23
+ * Custom CSS pseudo classes are now supported. See Nokogiri::XML::Node#css
24
+ * Nokogiri::XML::Node#<< will add a child to the current node
25
+
26
+ * Bugfixes
27
+
28
+ * Mutex lock on CSS cache access
29
+ * Fixed build problems with GCC 3.3.5
30
+ * XML::Node#to_xml now takes an indentation argument
31
+ * XML::Node#dup takes an optional depth argument
32
+ * XML::Node#add_previous_sibling returns new sibling node.
33
+
34
+ === 1.0.7
35
+
36
+ * Bugfixes
37
+
38
+ * Fixed memory leak when using Dike
39
+ * SAX parser now parses IO streams
40
+ * Comment nodes have their own class
41
+ * Nokogiri() should delegate to Nokogiri.parse()
42
+ * Prepending rather than appending to ENV['PATH'] on windows
43
+ * Fixed a bug in complex CSS negation selectors
44
+
45
+ === 1.0.6
46
+
47
+ * 5 Bugfixes
48
+
49
+ * XPath Parser raises a SyntaxError on parse failure
50
+ * CSS Parser raises a SyntaxError on parse failure
51
+ * filter() and not() hpricot compatibility added
52
+ * CSS searches via Node#search are now always relative
53
+ * CSS to XPath conversion is now cached
54
+
55
+ === 1.0.5
56
+
57
+ * Bugfixes
58
+
59
+ * Added mailing list and ticket tracking information to the README.txt
60
+ * Sets ENV['PATH'] on windows if it doesn't exist
61
+ * Caching results of NodeSet#[] on Document
62
+
63
+ === 1.0.4
64
+
65
+ * Bugfixes
66
+
67
+ * Changed memory mangement from weak refs to document refs
68
+ * Plugged some memory leaks
69
+ * Builder blocks can call methods from surrounding contexts
70
+
71
+ === 1.0.3
72
+
73
+ * 5 Bugfixes
74
+
75
+ * NodeSet now implements to_ary
76
+ * XML::Document should not implement parent
77
+ * More GC Bugs fixed. (Mike is AWESOME!)
78
+ * Removed RARRAY_LEN for 1.8.5 compatibility. Thanks Shane Hanna.
79
+ * inner_html fixed. (Thanks Yehuda!)
80
+
81
+ === 1.0.2
82
+
83
+ * 1 Bugfix
84
+
85
+ * extconf.rb should not check for frex and racc
86
+
87
+ === 1.0.1
88
+
89
+ * 1 Bugfix
90
+
91
+ * Made sure extconf.rb searched libdir and prefix so that ports libxml/ruby
92
+ will link properly. Thanks lucsky!
93
+
94
+ === 1.0.0 / 2008-07-13
95
+
96
+ * 1 major enhancement
97
+
98
+ * Birthday!
99
+
@@ -0,0 +1,141 @@
1
+ History.ja.txt
2
+ History.txt
3
+ Manifest.txt
4
+ README.ja.txt
5
+ README.txt
6
+ Rakefile
7
+ ext/nokogiri/extconf.rb
8
+ ext/nokogiri/html_document.c
9
+ ext/nokogiri/html_document.h
10
+ ext/nokogiri/html_sax_parser.c
11
+ ext/nokogiri/html_sax_parser.h
12
+ ext/nokogiri/native.c
13
+ ext/nokogiri/native.h
14
+ ext/nokogiri/xml_cdata.c
15
+ ext/nokogiri/xml_cdata.h
16
+ ext/nokogiri/xml_comment.c
17
+ ext/nokogiri/xml_comment.h
18
+ ext/nokogiri/xml_document.c
19
+ ext/nokogiri/xml_document.h
20
+ ext/nokogiri/xml_dtd.c
21
+ ext/nokogiri/xml_dtd.h
22
+ ext/nokogiri/xml_io.c
23
+ ext/nokogiri/xml_io.h
24
+ ext/nokogiri/xml_node.c
25
+ ext/nokogiri/xml_node.h
26
+ ext/nokogiri/xml_node_set.c
27
+ ext/nokogiri/xml_node_set.h
28
+ ext/nokogiri/xml_reader.c
29
+ ext/nokogiri/xml_reader.h
30
+ ext/nokogiri/xml_sax_parser.c
31
+ ext/nokogiri/xml_sax_parser.h
32
+ ext/nokogiri/xml_syntax_error.c
33
+ ext/nokogiri/xml_syntax_error.h
34
+ ext/nokogiri/xml_text.c
35
+ ext/nokogiri/xml_text.h
36
+ ext/nokogiri/xml_xpath.c
37
+ ext/nokogiri/xml_xpath.h
38
+ ext/nokogiri/xml_xpath_context.c
39
+ ext/nokogiri/xml_xpath_context.h
40
+ ext/nokogiri/xslt_stylesheet.c
41
+ ext/nokogiri/xslt_stylesheet.h
42
+ lib/action-nokogiri.rb
43
+ lib/nokogiri.rb
44
+ lib/nokogiri/css.rb
45
+ lib/nokogiri/css/generated_parser.rb
46
+ lib/nokogiri/css/generated_tokenizer.rb
47
+ lib/nokogiri/css/node.rb
48
+ lib/nokogiri/css/parser.rb
49
+ lib/nokogiri/css/parser.y
50
+ lib/nokogiri/css/syntax_error.rb
51
+ lib/nokogiri/css/tokenizer.rb
52
+ lib/nokogiri/css/tokenizer.rex
53
+ lib/nokogiri/css/xpath_visitor.rb
54
+ lib/nokogiri/decorators.rb
55
+ lib/nokogiri/decorators/hpricot.rb
56
+ lib/nokogiri/decorators/hpricot/node.rb
57
+ lib/nokogiri/decorators/hpricot/node_set.rb
58
+ lib/nokogiri/decorators/hpricot/xpath_visitor.rb
59
+ lib/nokogiri/decorators/slop.rb
60
+ lib/nokogiri/hpricot.rb
61
+ lib/nokogiri/html.rb
62
+ lib/nokogiri/html/builder.rb
63
+ lib/nokogiri/html/document.rb
64
+ lib/nokogiri/html/sax/parser.rb
65
+ lib/nokogiri/version.rb
66
+ lib/nokogiri/xml.rb
67
+ lib/nokogiri/xml/after_handler.rb
68
+ lib/nokogiri/xml/attr.rb
69
+ lib/nokogiri/xml/before_handler.rb
70
+ lib/nokogiri/xml/builder.rb
71
+ lib/nokogiri/xml/cdata.rb
72
+ lib/nokogiri/xml/comment.rb
73
+ lib/nokogiri/xml/document.rb
74
+ lib/nokogiri/xml/dtd.rb
75
+ lib/nokogiri/xml/element.rb
76
+ lib/nokogiri/xml/entity_declaration.rb
77
+ lib/nokogiri/xml/node.rb
78
+ lib/nokogiri/xml/node_set.rb
79
+ lib/nokogiri/xml/notation.rb
80
+ lib/nokogiri/xml/reader.rb
81
+ lib/nokogiri/xml/sax.rb
82
+ lib/nokogiri/xml/sax/document.rb
83
+ lib/nokogiri/xml/sax/parser.rb
84
+ lib/nokogiri/xml/syntax_error.rb
85
+ lib/nokogiri/xml/text.rb
86
+ lib/nokogiri/xml/xpath.rb
87
+ lib/nokogiri/xml/xpath/syntax_error.rb
88
+ lib/nokogiri/xml/xpath_context.rb
89
+ lib/nokogiri/xslt.rb
90
+ lib/nokogiri/xslt/stylesheet.rb
91
+ test/css/test_nthiness.rb
92
+ test/css/test_parser.rb
93
+ test/css/test_tokenizer.rb
94
+ test/css/test_xpath_visitor.rb
95
+ test/files/dont_hurt_em_why.xml
96
+ test/files/exslt.xml
97
+ test/files/exslt.xslt
98
+ test/files/staff.xml
99
+ test/files/staff.xslt
100
+ test/files/tlm.html
101
+ test/helper.rb
102
+ test/hpricot/files/basic.xhtml
103
+ test/hpricot/files/boingboing.html
104
+ test/hpricot/files/cy0.html
105
+ test/hpricot/files/immob.html
106
+ test/hpricot/files/pace_application.html
107
+ test/hpricot/files/tenderlove.html
108
+ test/hpricot/files/uswebgen.html
109
+ test/hpricot/files/utf8.html
110
+ test/hpricot/files/week9.html
111
+ test/hpricot/files/why.xml
112
+ test/hpricot/load_files.rb
113
+ test/hpricot/test_alter.rb
114
+ test/hpricot/test_builder.rb
115
+ test/hpricot/test_parser.rb
116
+ test/hpricot/test_paths.rb
117
+ test/hpricot/test_preserved.rb
118
+ test/hpricot/test_xml.rb
119
+ test/html/sax/test_parser.rb
120
+ test/html/test_builder.rb
121
+ test/html/test_document.rb
122
+ test/html/test_node.rb
123
+ test/test_convert_xpath.rb
124
+ test/test_css_cache.rb
125
+ test/test_gc.rb
126
+ test/test_memory_leak.rb
127
+ test/test_nokogiri.rb
128
+ test/test_reader.rb
129
+ test/test_xslt_transforms.rb
130
+ test/xml/sax/test_parser.rb
131
+ test/xml/test_attr.rb
132
+ test/xml/test_builder.rb
133
+ test/xml/test_cdata.rb
134
+ test/xml/test_comment.rb
135
+ test/xml/test_document.rb
136
+ test/xml/test_dtd.rb
137
+ test/xml/test_node.rb
138
+ test/xml/test_node_set.rb
139
+ test/xml/test_text.rb
140
+ test/xml/test_xpath.rb
141
+ vendor/hoe.rb
@@ -0,0 +1,100 @@
1
+ = Nokogiri (鋸)
2
+
3
+ * http://nokogiri.rubyforge.org/
4
+ * http://github.com/tenderlove/nokogiri/wikis
5
+ * http://github.com/tenderlove/nokogiri/tree/master
6
+ * http://rubyforge.org/mailman/listinfo/nokogiri-talk
7
+ * http://nokogiri.lighthouseapp.com/projects/19607-nokogiri/overview
8
+
9
+ == DESCRIPTION:
10
+
11
+ Nokogiri はHTMLやXMLやSAXやXSLTやReaderのパーサーです。
12
+
13
+ == FEATURES:
14
+
15
+ * XPath で探せる
16
+ * CSS3 のセレクターで探せる
17
+ * XML/HTMLのビルダーはある
18
+
19
+ 検索出来たり、正確にCSS3とXPathをサポート出来たりする。
20
+
21
+ これはスピードテストです:
22
+
23
+ * http://gist.github.com/24605
24
+
25
+ NokogiriはHpricotの代わりに使用出来る。
26
+ その互換性は簡単に正しいCSSとXPathを使用する事が出来る。
27
+
28
+ == SUPPORT:
29
+
30
+ ノコギリのメーリングリストは:
31
+
32
+ * http://rubyforge.org/mailman/listinfo/nokogiri-talk
33
+
34
+ バグファイルは:
35
+
36
+ * http://nokogiri.lighthouseapp.com/projects/19607-nokogiri/overview
37
+
38
+ == SYNOPSIS:
39
+
40
+ require 'nokogiri'
41
+ require 'open-uri'
42
+
43
+ doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove'))
44
+
45
+ ####
46
+ # Search for nodes by css
47
+ doc.css('h3.r a.l').each do |link|
48
+ puts link.content
49
+ end
50
+
51
+ ####
52
+ # Search for nodes by xpath
53
+ doc.xpath('//h3/a[@class="l"]').each do |link|
54
+ puts link.content
55
+ end
56
+
57
+ ####
58
+ # Or mix and match.
59
+ doc.search('h3.r a.l', '//h3/a[@class="l"]').each do |link|
60
+ puts link.content
61
+ end
62
+
63
+
64
+ == REQUIREMENTS:
65
+
66
+ * ruby 1.8 or 1.9
67
+ * libxml
68
+ * libxslt
69
+
70
+ == INSTALL:
71
+
72
+ * sudo gem install nokogiri
73
+
74
+ == LICENSE:
75
+
76
+ (The MIT License)
77
+
78
+ Copyright (c) 2008:
79
+
80
+ * {Aaron Patterson}[http://tenderlovemaking.com]
81
+ * {Mike Dalessio}[http://mike.daless.io]
82
+
83
+ Permission is hereby granted, free of charge, to any person obtaining
84
+ a copy of this software and associated documentation files (the
85
+ 'Software'), to deal in the Software without restriction, including
86
+ without limitation the rights to use, copy, modify, merge, publish,
87
+ distribute, sublicense, and/or sell copies of the Software, and to
88
+ permit persons to whom the Software is furnished to do so, subject to
89
+ the following conditions:
90
+
91
+ The above copyright notice and this permission notice shall be
92
+ included in all copies or substantial portions of the Software.
93
+
94
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
95
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
96
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
97
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
98
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
99
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
100
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,109 @@
1
+ = Nokogiri
2
+
3
+ * http://nokogiri.rubyforge.org/
4
+ * http://github.com/tenderlove/nokogiri/wikis
5
+ * http://github.com/tenderlove/nokogiri/tree/master
6
+ * http://rubyforge.org/mailman/listinfo/nokogiri-talk
7
+ * http://nokogiri.lighthouseapp.com/projects/19607-nokogiri/overview
8
+
9
+ == DESCRIPTION:
10
+
11
+ Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser.
12
+
13
+ == FEATURES:
14
+
15
+ * XPath support for document searching
16
+ * CSS3 selector support for document searching
17
+ * XML/HTML builder
18
+ * Drop in replacement for Hpricot (though not bug for bug)
19
+
20
+ Nokogiri parses and searches XML/HTML very quickly, and also has
21
+ correctly implemented CSS3 selector support as well as XPath support.
22
+
23
+ Here is a speed test:
24
+
25
+ * http://gist.github.com/24605
26
+
27
+ Nokogiri also features an Hpricot compatibility layer to help ease the change
28
+ to using correct CSS and XPath.
29
+
30
+ == SUPPORT:
31
+
32
+ The Nokogiri mailing list is available here:
33
+
34
+ * http://rubyforge.org/mailman/listinfo/nokogiri-talk
35
+
36
+ The bug tracker is available here:
37
+
38
+ * http://nokogiri.lighthouseapp.com/projects/19607-nokogiri/overview
39
+
40
+ == SYNOPSIS:
41
+
42
+ require 'nokogiri'
43
+ require 'open-uri'
44
+
45
+ doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove'))
46
+
47
+ ####
48
+ # Search for nodes by css
49
+ doc.css('h3.r a.l').each do |link|
50
+ puts link.content
51
+ end
52
+
53
+ ####
54
+ # Search for nodes by xpath
55
+ doc.xpath('//h3/a[@class="l"]').each do |link|
56
+ puts link.content
57
+ end
58
+
59
+ ####
60
+ # Or mix and match.
61
+ doc.search('h3.r a.l', '//h3/a[@class="l"]').each do |link|
62
+ puts link.content
63
+ end
64
+
65
+
66
+ == REQUIREMENTS:
67
+
68
+ * ruby 1.8 or 1.9
69
+ * libxml
70
+ * libxslt
71
+
72
+ == INSTALL:
73
+
74
+ * sudo gem install nokogiri
75
+
76
+ == DEVELOPMENT:
77
+
78
+ Developing Nokogiri requires racc and frex.
79
+
80
+ * rake install:deps
81
+ * rake test
82
+
83
+ == LICENSE:
84
+
85
+ (The MIT License)
86
+
87
+ Copyright (c) 2008:
88
+
89
+ * {Aaron Patterson}[http://tenderlovemaking.com]
90
+ * {Mike Dalessio}[http://mike.daless.io]
91
+
92
+ Permission is hereby granted, free of charge, to any person obtaining
93
+ a copy of this software and associated documentation files (the
94
+ 'Software'), to deal in the Software without restriction, including
95
+ without limitation the rights to use, copy, modify, merge, publish,
96
+ distribute, sublicense, and/or sell copies of the Software, and to
97
+ permit persons to whom the Software is furnished to do so, subject to
98
+ the following conditions:
99
+
100
+ The above copyright notice and this permission notice shall be
101
+ included in all copies or substantial portions of the Software.
102
+
103
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
104
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
105
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
106
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
107
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
108
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
109
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.