216件ヒット
[1-100件を表示]
(0.014秒)
種類
- インスタンスメソッド (192)
- 特異メソッド (12)
- 定数 (12)
ライブラリ
-
rexml
/ document (216)
キーワード
-
DEFAULT
_ ENTITIES (12) - add (12)
-
attribute
_ of (12) -
attributes
_ of (12) - clone (12)
- context (12)
- entities (12)
- entity (12)
-
external
_ id (12) - name (12)
- namespaces (12)
- new (12)
-
node
_ type (12) - notation (12)
- notations (12)
- public (12)
- system (12)
- write (12)
検索結果
先頭5件
-
REXML
:: DocType # node _ type -> Symbol (9102.0) -
Symbol :doctype を返します。
...Symbol :doctype を返します。... -
REXML
:: DocType # clone -> REXML :: DocType (3101.0) -
self の複製を返します。
...self の複製を返します。
external_id (REXML::DocType#external_id) と
名前(REXML::DocType#name) のみ複製されるため、
結果として得られるオブジェクトはあまり有用ではないでしょう。... -
REXML
:: DocType . new(source , parent = nil) -> REXML :: DocType (3101.0) -
DocType オブジェクトを生成します。
...DocType オブジェクトを生成します。
REXML::Source オブジェクトの場合は、Source オブジェクトが
保持している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.dtd">
EOS
このインターフェースは deprecated です。
このメソッドは他のインターフェースもありますが、内部用なので使わないで
くださ......い。
一般的にいって、XML 文書に含まれる DTD は REXML::Document.new などで
適切に解析され、REXML::Document#doctype で取得できます。
このメソッドを直接使う必要はありません。... -
REXML
:: DocType # add(child) -> () (3001.0) -
child を子ノード列の最後に追加します。
...child を子ノード列の最後に追加します。
REXML::Parent#add を内部で呼び出します。
また、REXML::DocType#entities を更新します。
@param child 追加するノード... -
REXML
:: DocType # attribute _ of(element , attribute) -> String | nil (3001.0) -
DTD 内の属性リスト宣言で、 element という名前の要素の 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
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") # => nil
//}... -
REXML
:: DocType # attributes _ of(element) -> [REXML :: Attribute] (3001.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
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_of("book")[0].value # => ""
//}... -
REXML
:: DocType # context -> { Symbol => object } (3001.0) -
DTD が属する文書の「コンテキスト」を返します。
DTD が属する文書の「コンテキスト」を返します。
具体的には親ノードである REXML::Document オブジェクトの
REXML::Element#context を返します。
コンテキストの具体的な内容については REXML::Element#context を
参照してください。 -
REXML
:: DocType # entities -> { String => REXML :: Entity } (3001.0) -
DTD で宣言されている実体の集合を Hash で返します。
...octype = 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.e... -
REXML
:: DocType # entity(name) -> String | nil (3001.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
//}...