るりまサーチ

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

別のキーワード

  1. dbm has_value?
  2. sdbm has_key?
  3. gdbm has_key?
  4. dbm has_key?
  5. sdbm has_value?

検索結果

REXML::Parsers::PullParser#has_next? -> bool (21101.0)

未処理のイベントが残っている場合に真を返します。

...未処理のイベントが残っている場合に真を返します。

@see REXML::Parsers::PullParser#empty?...

rexml/parsers/pullparser (6030.0)

プル方式の XML パーサ。

...、このパーサは REXML::Parsers::PullParser#pull
によってパーサから結果をイベントという形で順に能動的に取り出します。
外部的にはこのクラスのオブジェクトはイベントのキューと見なせます。
pull
はそのキューの先頭を取り...
...取り除きます。

pull
は REXML::Parsers::PullEvent オブジェクトを返します。
このオブジェクトの
REXML::Parsers::PullEvent#event_type で「開始タグ」「終了タグ」
といったイベントの種類を取得します。
REXML::Parsers::PullEvent#[] でそのイベ...
...<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", "UTF-8", nil]
# >> text: ["\n", "\n"]
# >> processing_instruction: ["xml-stylesheet", " type=\...