るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.162秒)
トップページ > クエリ:&[x] > クエリ:rexml/parsers/pullparser[x]

別のキーワード

  1. rexml/document new
  2. rexml/document write
  3. rexml/document clone
  4. rexml/document to_s
  5. rexml/document node_type

検索結果

rexml/parsers/pullparser (38030.0)

プル方式の XML パーサ。

...il))
XML宣言
: externalentity (エンティティ文字列)
doctype内のパラメータ実体参照。

//emlist[][ruby]{
require 'rexml/parsers/pullparser'
xml = <<EOS
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<!DOCTYPE root SYSTEM "foo" [...
...oo="http://example.org/foo"
xmlns:bar="http://example.org/bar"><![CDATA[cdata is here]]>
<a foo:att='1' bar:att='2' att='&lt;'/>
&
amp;&amp; <!-- comment here--> &bar;
</root>
EOS

parser = REXML::Parsers::PullParser.new(xml)
while parser.has_next?
p parser.pull
end
# >> xmldecl: ["1.0",...
...# >> text: ["\n ", "\n "]
# >> start_element: ["a", {"foo:att"=>"1", "bar:att"=>"2", "att"=>"&lt;"}]
# >> end_element: ["a"]
# >> text: ["\n &amp;&amp; ", "\n && "]
# >> comment: [" comment here"]
# >> text: [" &bar;\n", " barbarbarbar\n"]
# >> end_element: ["root"]
# >> text: ["\n", "\n"]
//}...

rexml (12.0)

Pure Ruby の XML パーサです。 DOM スタイルと SAX スタイルの両方をカバーしています。

...rexml/parsers/sax2parser
* rexml/parsers/streamparser
のいずれかを用います。

また、それ以外のパーサとして
* rexml/parsers/pullparser
* rexml/parsers/ultralightparser
などもあります。

=== リンク

* REXML Home
http://www.germane-software.com/software/...
...http://www.germane-software.com/software/rexml/docs/tutorial.html
日本語訳 http://www.baykit.org/~makotos/cgi-bin/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...