るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.076秒)

別のキーワード

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

ライブラリ

クラス

モジュール

検索結果

REXML::Entity#ndata -> String | nil (21102.0)

解析対象外実体(unparsed entity)宣言である場合には その記法名(notation name)を返します。

解析対象外実体(unparsed entity)宣言である場合には
その記法名(notation name)を返します。

それ以外の場合は nil を返します。

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

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

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

//emlist[][ruby]{
require 'rexml/parsers/baseparser'
require 'rexml/parsers/streamparser'
require 'rexml/streamlistener'
xml = <<EOS
<!DOCTYPE root [
<!ENTITY % YN '"Yes"'>
<!ENTITY % YN 'Yes'>
<!ENTITY WhatHeSaid "He...
...ity.com/boilerplate/OpenHatch.xml">
<!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\"", "%"]
# >>...