るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.081秒)
トップページ > クエリ:Class#new[x] > クエリ:extend[x] > クエリ:filename[x] > クエリ:NEWS for Ruby 2.3.0[x] > モジュール:REXML::StreamListener[x]

別のキーワード

  1. argf.class lines
  2. argf.class each_line
  3. argf.class each
  4. argf.class readlines
  5. argf.class readline

ライブラリ

検索結果

REXML::StreamListener#entitydecl(content) -> () (19.0)

DTDの実体宣言をパースしたときに呼び出されるコールバックメソッドです。

...<!ENTITY hatch-pic SYSTEM "../grafix/OpenHatch.gif" NDATA gif>
]>
<root />
EOS

class
Listener
include REXML::StreamListener
def entitydecl(content); p content; end
end
REXML::Parsers::StreamParser.new(xml, Listener.new).parse
# >> ["YN", "\"Yes\"", "%"]
# >> ["YN", "Yes", "%"]
# >> ["WhatHeSaid...