るりまサーチ (Ruby 3.0)

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

別のキーワード

  1. _builtin nil?
  2. nilclass nil?
  3. object nil?
  4. _builtin nil
  5. object nil

検索結果

REXML::DocType.new(source, parent = nil) -> REXML::DocType (54670.0)

DocType オブジェクトを生成します。

...トが
保持しているDTDのテキストがパースされ、その内容によって DocType
オブジェクトが初期化されます。
REXML::DocType
.new(Source.new(<<EOS))
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dt...

REXML::DocType#attribute_of(element, attribute) -> String | nil (403.0)

DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。

...かの場合は nil を返します。

@param element 要素名(文字列)
@param attribute 属性名(文字列)

//emlist[][ruby]{
require 'rexml/document'

doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book...

REXML::DocType#external_id -> String | nil (385.0)

DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の いずれかの文字列を返します。

..."SYSTEM", "PUBLIC" の
いずれかの文字列を返します。

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

//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/...

REXML::DocType#public -> String | nil (385.0)

DTD の公開識別子を返します。

...す。

DTD が公開識別子による外部サブセットを含んでいない場合は nil を返します。

//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/D...

REXML::DocType#system -> String | nil (385.0)

DTD のシステム識別子を返します。

...ム識別子を返します。

DTD が外部サブセットを含んでいない場合は nil を返します。

//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/D...

絞り込み条件を変える

REXML::DocType#entity(name) -> String | nil (367.0)

name という実体参照名を持つ実体を文字列で返します。

name という実体参照名を持つ実体を文字列で返します。

返される文字列は非正規化(REXML::Entity#unnormalized 参照)
された文字列が返されます。

name という名前を持つ実体が存在しない場合には nil を返します。

@param name 実体参照名(文字列)

//emlist[][ruby]{
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE foo [
<!ENTITY bar "barbarbarbar">
]>
EOS
p doctype.entity("bar") # => "ba...