1020件ヒット
[1-100件を表示]
(0.090秒)
クラス
-
REXML
:: AttlistDecl (24) -
REXML
:: Attribute (48) -
REXML
:: Attributes (84) -
REXML
:: Child (48) -
REXML
:: Comment (12) -
REXML
:: Declaration (12) -
REXML
:: DocType (60) -
REXML
:: Document (24) -
REXML
:: Element (228) -
REXML
:: Elements (132) -
REXML
:: Entity (12) -
REXML
:: ExternalEntity (12) -
REXML
:: Formatters :: Default (12) -
REXML
:: Formatters :: Pretty (24) -
REXML
:: Instruction (36) -
REXML
:: NotationDecl (36) -
REXML
:: Parent (132) -
REXML
:: Text (24) -
REXML
:: XMLDecl (36)
モジュール
-
REXML
:: Namespace (12) -
REXML
:: Node (12)
キーワード
- << (36)
- <=> (12)
- == (24)
- [] (24)
- []= (48)
- add (48)
-
add
_ attribute (24) -
add
_ attributes (12) -
add
_ element (12) -
add
_ namespace (24) - attribute (12)
-
attribute
_ of (12) - collect (12)
- compact= (12)
- content= (12)
- context= (12)
- delete (36)
-
delete
_ all (24) -
delete
_ attribute (12) -
delete
_ element (12) -
delete
_ namespace (12) - each (12)
-
each
_ element (12) -
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) - element= (12)
- entity (12)
-
get
_ attribute (12) -
get
_ attribute _ ns (12) -
get
_ elements (12) -
get
_ text (12) -
has
_ name? (12) - include? (12)
- index (12)
- inject (12)
-
insert
_ after (12) -
insert
_ before (12) - namespace (12)
-
next
_ sibling= (12) - normalized= (12)
- notation (12)
- parent= (12)
-
previous
_ sibling= (12) - public= (12)
- push (12)
- raw= (12)
-
replace
_ child (12) -
replace
_ with (12) - standalone= (12)
- string= (12)
- system= (12)
- target= (12)
- text (12)
- text= (12)
-
to
_ a (12) -
to
_ s (12) - unshift (12)
- width= (12)
- write (132)
- xmldecl (12)
検索結果
先頭5件
-
REXML
:: Element # delete _ attribute(key) -> REXML :: Attribute | nil (9309.0) -
要素から key という属性名の属性を削除します。
...。
@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.delete_attribute("x")... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (9115.0) -
namespace と name で特定される属性を返します。
...。
@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS......et_elements("/root/a").first
a.attributes.get_attribute_ns("", "att") # => att='<'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt... -
REXML
:: ExternalEntity # write(output , indent) -> () (9115.0) -
output へ self を文字列化して出力します。
...output へ self を文字列化して出力します。
このメソッドは deprecated です。REXML::Formatter で
出力してください。
@param output 出力先の IO オブジェクト
@param indent インデントの大きさ。無視されます。... -
REXML
:: Attributes # get _ attribute(name) -> Attribute | nil (9109.0) -
name という名前の属性を取得します。
...@param name 属性名(文字列)
@see REXML::Attributes#[]
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("....../root/a").first
a.attributes.get_attribute("att") # => att='<'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}... -
REXML
:: DocType # entity(name) -> String | nil (9109.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
:: Formatters :: Pretty # compact=(c) (9109.0) -
出力をコンパクトにするかどうかを設定します。
...出力をコンパクトにするかどうかを設定します。
@param c コンパクトな出力をするかどうかを指定します。
@see REXML::Formatters::Pretty#compact... -
REXML
:: Formatters :: Pretty # width=(w) (9109.0) -
出力のページ幅を設定します。
...出力のページ幅を設定します。
@param w ページ幅の設定値
@see REXML::Formatters::Pretty#width... -
REXML
:: Element # add _ attribute(attr) -> () (6221.0) -
要素の属性を追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...::Attribute オブジェクトを
渡す方法です。
文字列2つで指定する場合、属性値は unnormalized な文字列を渡す必要があります。
@param 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 # => <e a='b' x:a='c'/>
doc.root.add_attribute(REXML::Attribute.new("b", "d"))
doc.root # => <e a='b' x:a='c' b='d'/>
//}... -
REXML
:: DocType # attribute _ of(element , attribute) -> String | nil (6215.0) -
DTD 内の属性リスト宣言で、 element という名前の要素の attribute という 名前の属性のデフォルト値を返します。
...DTD 内の属性リスト宣言で、 element という名前の要素の attribute という
名前の属性のデフォルト値を返します。
elementという名前の要素の属性値は宣言されていない、
elementという名前の要素にはattributeという名前の属性が宣......@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 CDATA #REQUIRED
titl......e 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
//}...