るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.224秒)
トップページ > クエリ:processing_instruction[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 (38018.0)

プル方式の XML パーサ。

...う Hash
: end_element (要素名)
XML要素の終了タグ
: text (正規化文字列, 非正規化文字列)
テキストノード
: processing_instruction (ターゲット文字列, 内容文字列 | nil)
XML処理命令(Processing Instruction, PI)
: comment (コメント文字列)
コメ...
...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" [...
...L::Parsers::PullParser.new(xml)
while parser.has_next?
p parser.pull
end
# >> xmldecl: ["1.0", "UTF-8", nil]
# >> text: ["\n", "\n"]
# >> processing_instruction: ["xml-stylesheet", " type=\"text/css\" href=\"style.css\""]
# >> text: ["\n", "\n"]
# >> start_doctype: ["root", "SYSTEM", "foo", nil]
#...