別のキーワード
クラス
-
REXML
:: AttlistDecl (3) -
REXML
:: Attribute (2) -
REXML
:: Attributes (1) -
REXML
:: Comment (1) -
REXML
:: DocType (16) -
REXML
:: Document (2) -
REXML
:: Element (8) -
REXML
:: Elements (1) -
REXML
:: Entity (10) -
REXML
:: ExternalEntity (2) -
REXML
:: Formatters :: Pretty (2) -
REXML
:: Instruction (1) -
REXML
:: NotationDecl (1) -
REXML
:: Text (3) -
REXML
:: XMLDecl (1)
モジュール
-
REXML
:: Namespace (1)
キーワード
- [] (1)
- add (1)
-
add
_ attribute (1) -
attribute
_ of (1) -
attributes
_ of (1) - clone (1)
- compact (1)
- context (2)
-
delete
_ attribute (1) - doctype (2)
-
each
_ element _ with _ attribute (1) - empty? (2)
- entities (1)
- entity (1)
- external (1)
-
external
_ id (1) - include? (1)
- name (2)
- namespace (1)
- namespaces (2)
- ndata (1)
-
node
_ type (9) - normalized (1)
- notation (1)
- notations (1)
- prefix (1)
- prefixes (1)
- pubid (1)
- public (1)
- ref (1)
- system (2)
-
to
_ a (1) -
to
_ s (2) - unnormalized (1)
- value (1)
- width (1)
- write (3)
検索結果
先頭5件
-
REXML
:: DocType # node _ type -> Symbol (27610.0) -
Symbol :doctype を返します。
Symbol :doctype を返します。 -
REXML
:: Document # doctype -> REXML :: DocType | nil (18910.0) -
文書の DTD を返します。
文書の DTD を返します。
文書が DTD を持たない場合は nil を返します。 -
REXML
:: Text # doctype -> REXML :: DocType | nil (18910.0) -
テキストノードが属する文書の DTD を返します。
テキストノードが属する文書の DTD を返します。
そのような文書(REXML::Document)が存在しない、すなわち
テキストノードの親ノードを辿っても REXML::Document に到達しない、
場合には nil を返します。
@see REXML::DocType -
REXML
:: DocType # system -> String | nil (18646.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
:: AttlistDecl # node _ type -> Symbol (18610.0) -
Symbol :attlistdecl を返します。
Symbol :attlistdecl を返します。 -
REXML
:: Attribute # node _ type -> Symbol (18610.0) -
「:attribute」というシンボルを返します。
「:attribute」というシンボルを返します。 -
REXML
:: Comment # node _ type -> Symbol (18610.0) -
シンボル :comment を返します。
シンボル :comment を返します。 -
REXML
:: DocType # entity(name) -> String | nil (18610.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... -
REXML
:: Document # node _ type -> Symbol (18610.0) -
シンボル :document を返します。
シンボル :document を返します。 -
REXML
:: Element # node _ type -> Symbol (18610.0) -
シンボル :element を返します。
シンボル :element を返します。 -
REXML
:: Elements # empty? -> bool (18610.0) -
子要素を持たない場合に true を返します。
子要素を持たない場合に true を返します。 -
REXML
:: Instruction # node _ type -> Symbol (18610.0) -
Symbol :processing_instruction を返します。
Symbol :processing_instruction を返します。 -
REXML
:: Namespace # fully _ expanded _ name -> String (18610.0) -
完全修飾名を返します。
完全修飾名を返します。 -
REXML
:: NotationDecl # system -> String | nil (18610.0) -
システム識別子(URI)を返します。
システム識別子(URI)を返します。
宣言がシステム識別子を含まない場合は nil を返します。 -
REXML
:: Text # empty? -> bool (18610.0) -
テキストが空ならば真を返します。
テキストが空ならば真を返します。 -
REXML
:: Text # node _ type -> Symbol (18610.0) -
Symbol :text を返します。
Symbol :text を返します。 -
REXML
:: XMLDecl # node _ type -> Symbol (18610.0) -
シンボル :xmldecl を返します。
シンボル :xmldecl を返します。 -
REXML
:: DocType # clone -> REXML :: DocType (9610.0) -
self の複製を返します。
self の複製を返します。
external_id (REXML::DocType#external_id) と
名前(REXML::DocType#name) のみ複製されるため、
結果として得られるオブジェクトはあまり有用ではないでしょう。 -
REXML
:: DocType # context -> { Symbol => object } (9610.0) -
DTD が属する文書の「コンテキスト」を返します。
DTD が属する文書の「コンテキスト」を返します。
具体的には親ノードである REXML::Document オブジェクトの
REXML::Element#context を返します。
コンテキストの具体的な内容については REXML::Element#context を
参照してください。 -
REXML
:: DocType # entities -> { String => REXML :: Entity } (9610.0) -
DTD で宣言されている実体の集合を Hash で返します。
DTD で宣言されている実体の集合を Hash で返します。
返される 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
:: DocType # public -> String | nil (9346.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 # external _ id -> String | nil (9328.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 # name -> String (9328.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
:: Entity # write(out , indent = -1) -> () (9313.0) -
実体宣言を文字列化したものを out に書き込みます。
実体宣言を文字列化したものを out に書き込みます。
@param out 出力先の IO オブジェクト
@param indent 利用されません。deprecated なパラメータです
@see REXML::Entity#to_s -
REXML
:: DocType # add(child) -> () (9310.0) -
child を子ノード列の最後に追加します。
child を子ノード列の最後に追加します。
REXML::Parent#add を内部で呼び出します。
また、REXML::DocType#entities を更新します。
@param child 追加するノード -
REXML
:: DocType # attribute _ of(element , attribute) -> String | nil (9310.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 # attributes _ of(element) -> [REXML :: Attribute] (9310.0) -
DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。
...、各 Attribute オブジェクトの
REXML::Attribute#name と
REXML::Attribute#value で表現されます。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book... -
REXML
:: DocType # namespaces -> nil (9310.0) -
nil を返します。
nil を返します。 -
REXML
:: DocType # notation(name) -> REXML :: NotationDecl | nil (9310.0) -
DTD に含まれている記法宣言 (REXML::NotationDecl) で name という名前を持つものを返します。
DTD に含まれている記法宣言 (REXML::NotationDecl) で
name という名前を持つものを返します。
name という名前を持つ記法宣言が存在しない場合は nil を返します。
@param name 検索する記法名 -
REXML
:: DocType # notations -> [REXML :: NotationDecl] (9310.0) -
DTD に含まれている記法宣言 (REXML::NotationDecl) を 配列で返します。
DTD に含まれている記法宣言 (REXML::NotationDecl) を
配列で返します。 -
REXML
:: DocType # write(output , indent = 0 , transitive = false , ie _ hack = false) -> () (9310.0) -
output に DTD を出力します。
...ます。指定しないでください。
@param ie_hack 無視されます。指定しないでください。
//emlist[][ruby]{
require 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book... -
REXML
:: Entity # external -> String | nil (9310.0) -
実体が外部実体(external entity)宣言である場合は "SYSTEM" もしくは "PUBLIC" という文字列を返します。
実体が外部実体(external entity)宣言である場合は
"SYSTEM" もしくは "PUBLIC" という文字列を返します。
内部実体(internal entity)宣言である場合には nil を返します。 -
REXML
:: Entity # name -> String (9310.0) -
実体の名前を返します。
実体の名前を返します。 -
REXML
:: Entity # ndata -> String | nil (9310.0) -
解析対象外実体(unparsed entity)宣言である場合には その記法名(notation name)を返します。
解析対象外実体(unparsed entity)宣言である場合には
その記法名(notation name)を返します。
それ以外の場合は nil を返します。 -
REXML
:: Entity # normalized -> String | nil (9310.0) -
正規化された(normalized)実体の値を返します。
正規化された(normalized)実体の値を返します。
すなわち、一切の実体参照を展開していない値を返します。
外部実体(external entity)宣言の場合は nil を返します。
@see REXML::Entity#value, REXML::Entity#unnormalized -
REXML
:: Entity # pubid -> String | nil (9310.0) -
公開識別子(public identifier)を用いた外部実体宣言の場合は、その公開識別子を 返します。
公開識別子(public identifier)を用いた外部実体宣言の場合は、その公開識別子を
返します。
それ以外の場合は nil を返します。 -
REXML
:: Entity # ref -> String | nil (9310.0) -
外部実体(external entity)宣言の URI を返します。
外部実体(external entity)宣言の URI を返します。
内部実体宣言の場合は nil を返します。 -
REXML
:: Entity # to _ s -> String (9310.0) -
実体宣言を文字列化したものを返します。
実体宣言を文字列化したものを返します。
@see REXML::Entity#write
//emlist[][ruby]{
e = REXML::ENTITY.new("w", "wee");
p e.to_s # => "<!ENTITY w \"wee\">"
//} -
REXML
:: Entity # unnormalized -> String | nil (9310.0) -
非正規化された(unnormalized)実体の値を返します。
非正規化された(unnormalized)実体の値を返します。
すなわち、self が属する DTD によってすべての実体参照(&ent; と %ent; の両方)
を展開した文字列を返します。
外部実体(external entity)宣言の場合は nil を返します。
@see REXML::Entity#value, REXML::Entity#normalized -
REXML
:: Entity # value -> String | nil (9310.0) -
実体の値を返します。
実体の値を返します。
パラメータ実体参照(parameter entity)のみが展開され、
そうでない実体参照(general entity)は展開されて
いないような値が返されます。
外部実体(external entity)宣言の場合は nil を返します。
@see REXML::Entity#unnormalized, REXML::Entity#normalized -
REXML
:: ExternalEntity # to _ s -> String (9310.0) -
宣言を文字列化します。
宣言を文字列化します。 -
REXML
:: ExternalEntity # write(output , indent) -> () (9310.0) -
output へ self を文字列化して出力します。
output へ self を文字列化して出力します。
このメソッドは deprecated です。REXML::Formatter で
出力してください。
@param output 出力先の IO オブジェクト
@param indent インデントの大きさ。無視されます。 -
REXML
:: Formatters :: Pretty # compact -> bool (9310.0) -
出力をコンパクトにするかどうかを返します。
出力をコンパクトにするかどうかを返します。
これが真の場合、出力の空白をできる限り削除しようとします。
デフォルト値は false です。
@see REXML::Formatters::Pretty#compact= -
REXML
:: Formatters :: Pretty # width -> Integer (9310.0) -
出力のページ幅を返します。
出力のページ幅を返します。
デフォルトは80です。
@see REXML::Formatters::Pretty#width= -
REXML
:: Element # delete _ attribute(key) -> REXML :: Attribute | nil (664.0) -
要素から key という属性名の属性を削除します。
...nil を返します。
@param key 削除する要素(文字列(属性名) or REXML::Attributeオブジェクト)
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("E")
e.add_attribute("x", "foo"); e # => <E x='foo'/>
e.add_attribute("y:x", "bar"); e # => <E x='foo' y:x='bar'/>
e.de... -
REXML
:: AttlistDecl # [](key) -> String | nil (610.0) -
key という属性名のデフォルト値を返します。
key という属性名のデフォルト値を返します。
key という名前の属性が存在しない、もしくは
デフォルト値を持たない場合は nil を返します。 -
REXML
:: AttlistDecl # include?(key) -> bool (610.0) -
key が属性名であるならば真を返します。
key が属性名であるならば真を返します。
@param key 属性名であるかどうか判定する文字列 -
REXML
:: Element # add _ attribute(key , value) -> () (610.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...key 属性名(文字列)
@param value 属性値(文字列)
@param attr 属性(REXML::Attribute オブジェクト)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<e/>")
doc.root.add_attribute("a", "b"); doc.root # => <e a='b'/>
doc.root.add_attribute("x:a", "c"); doc.root # =... -
REXML
:: Element # context -> {Symbol => object} | nil (610.0) -
要素の「コンテキスト」を Hash で返します。
要素の「コンテキスト」を Hash で返します。
コンテキストとは text node (REXML::Text) での特別な文字、特に空白について
の取り扱いについての設定です。
以下の Symbol をハッシュのキーとして使います。
: :respect_whitespace
空白を考慮して欲しい要素の名前の集合を文字列の配列で指定します。
また、すべての要素で空白を考慮して欲しい場合には
:all を指定します。
デフォルト値は :all です。
REXML::Element#whitespace も参照してください。
: :compress_whitespac... -
REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> () (610.0) -
特定の属性を持つすべての子要素を引数としてブロックを呼び出します。
...値(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a><b id='1'/><c id='2'/><d id='1'/><e/></a>")
doc.root.each_element_with_attribute('id'){|e| p e }
# >> <b id='1'/... -
REXML
:: Element # namespace(prefix=nil) -> String (382.0) -
self の文脈で prefix が指している名前空間の URI を返します。
...返します。
prefix で指示される名前空間の宣言が存在しない場合は nil を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns='1' xmlns:y='2'><b/><c xmlns:z='3'/><y:d /></a>")
b = doc.elements['//b']
b.namespace # => "1"
b.name... -
REXML
:: Attributes # to _ a -> [Attribute] (346.0) -
属性の配列を返します。
...属性の配列を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a x='1' y='2' z='3' />")
doc.root.attributes.to_a # => [x='1', y='2', z='3']
//}... -
REXML
:: Element # namespaces -> {String => String} (346.0) -
self の文脈で定義されている名前空間の情報を返します。
...定義されている名前空間を、{ prefix => 識別子 }
というハッシュテーブルで返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
doc.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"}
//}... -
REXML
:: Element # prefixes -> [String] (346.0) -
self の文脈で定義されている prefix を文字列の配列を返します。
...字列の配列を返します。
対象の要素とその外側の要素で定義されている prefix を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
doc.elements['//b'].prefixes # => ["x", "y"]
//}... -
REXML
:: Attribute # prefix -> String (328.0) -
属性の名前空間を返します。
...属性の名前空間を返します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new( "elns:myelement" )
e.add_attribute( "nsa:a", "aval" )
e.add_attribute( "b", "bval" )
p e.attributes.get_attribute( "a" ).prefix # -> "nsa"
p e.attributes.get_attribute( "b" ).prefix # -> "...