るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.031秒)
トップページ > クエリ:-[x] > クエリ:on[x] > クエリ:new[x] > ライブラリ:rexml/streamlistener[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

モジュール

検索結果

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

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

...す。

@param content 実体宣言が配列で渡されます

実体宣言の書き方によって content に渡されるデータの形式が異なります。

//emlist[][ruby]{
require 'rexml/parsers/baseparser'
require 'rexml/parsers/streamparser'
require 'rexml/streamlistener'
xml = <<EOS
<!...
...atHeSaid "He said %YN;">
<!ENTITY open-hatch SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">
<!ENTITY open-hatch PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN" "http://www.textuality.com/boilerplate/OpenHatch.xml">
<!ENTITY hatch-pic SYSTEM "../grafix/OpenHatch.gif" N...
...ecl(content); p content; end
end
REXML::Parsers::StreamParser.new(xml, Listener.new).parse
# >> ["YN", "\"Yes\"", "%"]
# >> ["YN", "Yes", "%"]
# >> ["WhatHeSaid", "He said %YN;"]
# >> ["open-hatch", "SYSTEM", "http://www.textuality.com/boilerplate/OpenHatch.xml"]
# >> ["open-hatch", "PUBLIC", "-//Te...