22件ヒット
[1-22件を表示]
(0.342秒)
別のキーワード
検索結果
-
rexml
/ parsers / sax2parser (38114.0) -
SAX2 と同等の API を持つストリーム式の XML パーサ。
...r#listen を参照してください。
REXML::Parsers::StreamParser のパーサよりは高機能です。
//emlist[][ruby]{
require 'rexml/parsers/sax2parser'
require 'rexml/sax2listener'
parser = REXML::Parsers::SAX2Parser.new(<<XML)
<root n="0">
<a n="1">111</a>
<b n="2">222</b>
<a n="......=>"3"}]]
as # => [["a", {"n"=>"1"}], ["a", {"n"=>"3"}]]
texts # => ["111", "333"]
//}
//emlist[仕様確認サンプル][ruby]{
require 'rexml/parsers/sax2parser'
require 'rexml/sax2listener'
xml = <<EOS
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<!......TATION foobar SYSTEM "http://example.org/foobar.dtd">
<!ENTITY % HTMLsymbol PUBLIC
"-//W3C//ENTITIES Symbols for XHTML//EN"
"xhtml-symbol.ent">
%HTMLsymbol;
]>
<root xmlns="http://example.org/default"
xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar"><... -
rexml (48.0)
-
Pure Ruby の XML パーサです。 DOM スタイルと SAX スタイルの両方をカバーしています。
...API には、
* rexml/parsers/sax2parser
* rexml/parsers/streamparser
のいずれかを用います。
また、それ以外のパーサとして
* rexml/parsers/pullparser
* rexml/parsers/ultralightparser
などもあります。
=== リンク
* REXML Home
http://www.germane-soft......e/rexml
* API リファレンス
http://www.germane-software.com/software/rexml_doc
日本語訳 http://pub.cozmixng.org/~kou/rexml-doc-ja/
* チュートリアル
http://www.germane-software.com/software/rexml/docs/tutorial.html
日本語訳 http://www.baykit.org/~makotos/cgi-bi......n/wiliki.cgi?REXML%A5%C1%A5%E5%A1%BC%A5%C8%A5%EA%A5%A2%A5%EB&l=jp
* 日本語
http://www.cozmixng.org/~kou/ruby/rexml/
http://www.cozmixng.org/~kou/ruby/rexml/reference...