165件ヒット
[1-100件を表示]
(0.091秒)
種類
- インスタンスメソッド (143)
- 定数 (11)
- 特異メソッド (11)
ライブラリ
-
rexml
/ document (165)
キーワード
-
DEFAULT
_ ENTITIES (11) - add (11)
-
attribute
_ of (11) -
attributes
_ of (11) - entities (11)
- entity (11)
-
external
_ id (11) - name (11)
- namespaces (11)
- new (11)
- notation (11)
- notations (11)
- public (11)
- system (11)
- write (11)
検索結果
先頭5件
-
REXML
:: DocType # attribute _ of(element , attribute) -> String | nil (6201.0) -
DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。
...ト宣言で、 element という名前の要素の attribute という
名前の属性のデフォルト値を返します。
elementという名前の要素の属性値は宣言されていない、
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......UIRED
title CDATA #REQUIRED
publisher 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") # => ni... -
REXML
:: DocType # attributes _ of(element) -> [REXML :: Attribute] (6201.0) -
DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。
...の名前とデフォルト値を REXML::Attribute の配列で返します。
名前とデフォルト値のペアは、各 Attribute オブジェクトの
REXML::Attribute#name と
REXML::Attribute#value で表現されます。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Docume......<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
publisher 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_o... -
REXML
:: DocType # entities -> { String => REXML :: Entity } (6201.0) -
DTD で宣言されている実体の集合を Hash で返します。
...ity オブジェクト
を値とするハッシュテーブルです。
これには、XML のデフォルトの実体(gt, lt, quot, apos)も含まれています。
//emlist[][ruby]{
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE foo [
<!ENTITY bar "barbarbarbar">
]>
EOS
p doctype.enti......ties # => { "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 # notation(name) -> REXML :: NotationDecl | nil (6201.0) -
DTD に含まれている記法宣言 (REXML::NotationDecl) で name という名前を持つものを返します。
...DTD に含まれている記法宣言 (REXML::NotationDecl) で
name という名前を持つものを返します。
name という名前を持つ記法宣言が存在しない場合は nil を返します。
@param name 検索する記法名... -
REXML
:: DocType # notations -> [REXML :: NotationDecl] (6201.0) -
DTD に含まれている記法宣言 (REXML::NotationDecl) を 配列で返します。
...DTD に含まれている記法宣言 (REXML::NotationDecl) を
配列で返します。... -
REXML
:: DocType # write(output , indent = 0 , transitive = false , ie _ hack = false) -> () (6201.0) -
output に DTD を出力します。
...utput 出力先の IO オブジェクト
@param indent インデントの深さ。指定しないでください。
@param transitive 無視されます。指定しないでください。
@param ie_hack 無視されます。指定しないでください。
//emlist[][ruby]{
require 'rexml/documen......ENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
<!ENTITY p "foobar publisher">
<!ENTITY % q "quzz">
]>
EOS
doctype.write(STDOUT)
# =>
# <!DOCTYPE books [
# <!ELEMENT book (... -
REXML
:: DocType :: DEFAULT _ ENTITIES -> { String => REXML :: Entity } (6201.0) -
XML の仕様上デフォルトで定義されている実体の Hash table。
...XML の仕様上デフォルトで定義されている実体の Hash table。
"amp" => REXML::EntityConst::AMP は含まれません。... -
REXML
:: DocType # entity(name) -> String | nil (6101.0) -
name という実体参照名を持つ実体を文字列で返します。
...EXML::Entity#unnormalized 参照)
された文字列が返されます。
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 # external _ id -> String | nil (6101.0) -
DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の いずれかの文字列を返します。
...IC" の
いずれかの文字列を返します。
それ以外の場合は 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/DTD/xhtml1-stri......me # => "html"
doctype.external_id # => "PUBLIC"
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT books (book+)>
<!ELEMENT book (title,author)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
]>
EOS
doctype.name # => "books"
doctype.external_id # => nil
//}... -
REXML
:: DocType # public -> String | nil (6101.0) -
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/DTD/xhtml1-strict.dtd">
EOS
doctype.system # => "http://www.w3.org/TR/xhtml1/DTD/xhtml1-stri......ct.dtd"
doctype.public # => "-//W3C//DTD XHTML 1.0 Strict//EN"
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE root SYSTEM "foobar">
EOS
doctype.system # => "foobar"
doctype.public # => nil
//}...