るりまサーチ

最速Rubyリファレンスマニュアル検索!
176件ヒット [1-100件を表示] (0.140秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:p[x] > クラス:REXML::DocType[x]

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. dh p
  5. rsa p

ライブラリ

キーワード

検索結果

<< 1 2 > >>

REXML::DocType#node_type -> Symbol (9102.0)

Symbol :doctype を返します。

...Symbol :doctype を返します。...

REXML::DocType#namespaces -> nil (6102.0)

nil を返します。

nil を返します。

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

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

...ype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.system # => "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype.public # => "-//W3C//DTD XHTML 1.0 Strict//EN"

doctyp...
...e = REXML::Document.new(<<EOS).doctype
<!DOCTYPE root SYSTEM "foobar">
EOS
doctype.system # => "foobar"
doctype.public # => nil
//}...

REXML::DocType#write(output, indent = 0, transitive = false, ie_hack = false) -> () (3108.0)

output に DTD を出力します。

...output に DTD を出力します。

このメソッドは deprecated です。REXML::Formatter で
出力してください。

@param output 出力先の IO オブジェクト
@param indent インデントの深さ。指定しないでください。
@param transitive 無視されます。指定...
...しないでください。
@param ie_hack 無視されます。指定しないでください。

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

doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #...
...REQUIRED
title CDATA #REQUIRED
p
ublisher CDATA "foobar publisher">
<!ENTITY p "foobar publisher">
<!ENTITY % q "quzz">
]>
EOS

doctype.write(STDOUT)
# =>
# <!DOCTYPE books [
# <!ELEMENT book (comment)>
# ....
//}...

REXML::DocType#clone -> REXML::DocType (3102.0)

self の複製を返します。

...self の複製を返します。

external_id (REXML::DocType#external_id) と
名前(REXML::DocType#name) のみ複製されるため、
結果として得られるオブジェクトはあまり有用ではないでしょう。...

絞り込み条件を変える

REXML::DocType#attribute_of(element, attribute) -> String | nil (3026.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
auth...
...QUIRED
title CDATA #REQUIRED
p
ublisher CDATA "foobar publisher">
]>
EOS

p
doctype.attribute_of("book", "publisher") # => "foobar publisher"
p
doctype.attribute_of("bar", "foo") # => nil
p
doctype.attribute_of("book", "baz") # => nil
p
doctype.attribute_of("book", "title") # => n...

REXML::DocType#attributes_of(element) -> [REXML::Attribute] (3020.0)

DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。

...'rexml/document'

doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
p
ublisher CDATA "foobar publisher">
]>
EOS

p
doctype.attributes_of("book"...
...)
# => [author='', title='', publisher='foobar publisher']
p
doctype.attributes_of("book")[0].name # => "author"
p
doctype.attributes_of("book")[0].value # => ""
//}...

REXML::DocType#entities -> { String => REXML::Entity } (3020.0)

DTD で宣言されている実体の集合を Hash で返します。

...t, quot, apos)も含まれています。

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

p
doctype.entities # => { "gt" => #<REXML::Entity: ...>,
# "lt" => #<REXML::Entity: ...>, ... }
p
doctype.entities...
...["bar"].to_s # => "<!ENTITY bar \"barbarbarbar\">"
p
doctype.entities["gt"].to_s # => "<!ENTITY gt \">\">"
//}...

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

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

...つ実体が存在しない場合には nil を返します。

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

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

REXML::DocType#name -> String (3008.0)

ルート要素名を返します。

...ルート要素名を返します。

//emlist[][ruby]{
document = REXML::Document.new(<<EOS)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype = document.doctype
p
doctype.name # => "html"
//}...

絞り込み条件を変える

<< 1 2 > >>