別のキーワード
クラス
-
REXML
:: DocType (16) -
REXML
:: Document (3) -
REXML
:: Text (1)
キーワード
- << (1)
- add (2)
-
attribute
_ of (1) -
attributes
_ of (1) - clone (1)
- context (1)
- doctype (2)
- entities (1)
- entity (1)
-
external
_ id (1) - name (1)
- namespaces (1)
-
node
_ type (1) - notation (1)
- notations (1)
- public (1)
- system (1)
- write (1)
検索結果
先頭5件
-
REXML
:: DocType # clone -> REXML :: DocType (63346.0) -
self の複製を返します。
...self の複製を返します。
external_id (REXML::DocType#external_id) と
名前(REXML::DocType#name) のみ複製されるため、
結果として得られるオブジェクトはあまり有用ではないでしょう。... -
REXML
:: DocType # add(child) -> () (63025.0) -
child を子ノード列の最後に追加します。
...child を子ノード列の最後に追加します。
REXML::Parent#add を内部で呼び出します。
また、REXML::DocType#entities を更新します。
@param child 追加するノード... -
REXML
:: DocType # attribute _ of(element , attribute) -> String | nil (63007.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
author... -
REXML
:: DocType # attributes _ of(element) -> [REXML :: Attribute] (63007.0) -
DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。
...デフォルト値を REXML::Attribute の配列で返します。
名前とデフォルト値のペアは、各 Attribute オブジェクトの
REXML::Attribute#name と
REXML::Attribute#value で表現されます。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS... -
REXML
:: DocType # context -> { Symbol => object } (63007.0) -
DTD が属する文書の「コンテキスト」を返します。
...DTD が属する文書の「コンテキスト」を返します。
具体的には親ノードである REXML::Document オブジェクトの
REXML::Element#context を返します。
コンテキストの具体的な内容については REXML::Element#context を
参照してください。... -
REXML
:: DocType # entities -> { String => REXML :: Entity } (63007.0) -
DTD で宣言されている実体の集合を Hash で返します。
...体参照名をキーとし、対応する REXML::Entity オブジェクト
を値とするハッシュテーブルです。
これには、XML のデフォルトの実体(gt, lt, 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 (63007.0) -
name という実体参照名を持つ実体を文字列で返します。
...れる文字列は非正規化(REXML::Entity#unnormalized 参照)
された文字列が返されます。
name という名前を持つ実体が存在しない場合には nil を返します。
@param name 実体参照名(文字列)
//emlist[][ruby]{
doctype = REXML::Document.new(<<EOS).doctype... -
REXML
:: DocType # external _ id -> String | nil (63007.0) -
DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の いずれかの文字列を返します。
...t[][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.name # => "html"
doctype.external_id # => "PUBLIC"
doctype = REXML::Document.new(<<EO... -
REXML
:: DocType # name -> String (63007.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"
//}... -
REXML
:: DocType # namespaces -> nil (63007.0) -
nil を返します。
nil を返します。 -
REXML
:: DocType # node _ type -> Symbol (63007.0) -
Symbol :doctype を返します。
Symbol :doctype を返します。 -
REXML
:: DocType # notation(name) -> REXML :: NotationDecl | nil (63007.0) -
DTD に含まれている記法宣言 (REXML::NotationDecl) で name という名前を持つものを返します。
...DTD に含まれている記法宣言 (REXML::NotationDecl) で
name という名前を持つものを返します。
name という名前を持つ記法宣言が存在しない場合は nil を返します。
@param name 検索する記法名... -
REXML
:: DocType # notations -> [REXML :: NotationDecl] (63007.0) -
DTD に含まれている記法宣言 (REXML::NotationDecl) を 配列で返します。
...DTD に含まれている記法宣言 (REXML::NotationDecl) を
配列で返します。... -
REXML
:: DocType # public -> String | nil (63007.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/DTD/xhtm......l1-strict.dtd">
EOS
doctype.system # => "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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
//}... -
REXML
:: DocType # system -> String | nil (63007.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/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"
doctype = 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) -> () (63007.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 #... -
REXML
:: Text # doctype -> REXML :: DocType | nil (328.0) -
テキストノードが属する文書の DTD を返します。
...テキストノードが属する文書の DTD を返します。
そのような文書(REXML::Document)が存在しない、すなわち
テキストノードの親ノードを辿っても REXML::Document に到達しない、
場合には nil を返します。
@see REXML::DocType... -
REXML
:: Document # doctype -> REXML :: DocType | nil (310.0) -
文書の DTD を返します。
文書の DTD を返します。
文書が DTD を持たない場合は nil を返します。 -
REXML
:: Document # <<(child) -> () (25.0) -
子ノードを追加します。
...子ノードを追加します。
追加できるものは
* XML宣言(REXML::XMLDecl)
* DTD(REXML::DocType)
* ルート要素
のいずれかです。... -
REXML
:: Document # add(child) -> () (25.0) -
子ノードを追加します。
...子ノードを追加します。
追加できるものは
* XML宣言(REXML::XMLDecl)
* DTD(REXML::DocType)
* ルート要素
のいずれかです。...