300件ヒット
[101-200件を表示]
(0.156秒)
別のキーワード
種類
- インスタンスメソッド (264)
- クラス (24)
- 特異メソッド (12)
ライブラリ
-
rexml
/ document (300)
クラス
-
REXML
:: Attribute (36) -
REXML
:: Attributes (192) -
REXML
:: DocType (12) -
REXML
:: Element (36)
キーワード
- << (12)
- Attributes (12)
- Element (12)
- [] (12)
- []= (12)
- add (12)
-
add
_ attributes (12) -
attributes
_ of (12) - delete (12)
-
delete
_ all (12) - each (12)
-
each
_ attribute (12) -
get
_ attribute (12) -
get
_ attribute _ ns (12) -
has
_ attributes? (12) - length (12)
- namespace (12)
- namespaces (12)
- new (12)
- prefix (12)
- prefixes (12)
- size (12)
-
to
_ a (12) -
to
_ string (12)
検索結果
先頭5件
-
REXML
:: Attributes # [](name) -> String | nil (11024.0) -
属性名nameの属性値を返します。
...e オブジェクトが必要な場合は
REXML::Attributes#get_attribute を使ってください。
nameという属性名の属性がない場合は nil を返します。
@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
a = doc.get_elements("/root/a").first
p a.attributes["att"] # => "<"
p a.attributes["bar:att"] # => "2"
//}... -
REXML
:: Attributes # []=(name , value) (11024.0) -
指定した属性を更新します。
...][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["att"] = "9"
a.attributes["foo:attt"] = "8......"
a # => <a foo:att='1' bar:att='2' att='9' foo:attt='8'/>
//}
@see REXML::Attributes#add... -
REXML
:: Attributes # get _ attribute(name) -> Attribute | nil (11024.0) -
name という名前の属性を取得します。
...e 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_attr......ibute("att") # => att='<'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}... -
REXML
:: Attributes # namespaces -> { String => String } (11018.0) -
self の中で宣言されている名前空間の集合を返します。
...//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
p doc.root.attributes.namespaces
# => {"foo"=>"......http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}... -
REXML
:: Attributes # prefixes -> [String] (11018.0) -
self の中で宣言されている prefix の集合を 文字列の配列で返します。
...ire '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
p doc.root.attributes.prefixes # => ["foo", "bar"]
p a.attributes.pre... -
REXML
:: Attributes # delete _ all(name) -> [REXML :: Attribute] (11012.0) -
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
a = doc.get_elements("/root/a").first
a.attributes.delete_all("att") # => [att='&l... -
REXML
:: Attributes # each {|name , value| . . . } -> () (11012.0) -
各属性の名前と値に対しブロックを呼び出します。
...//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.each do |name, value|
p [name,... -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (11012.0) -
各属性に対しブロックを呼び出します。
...//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.each_attribute do |attr|
p [at... -
REXML
:: Attributes # length -> Integer (11012.0) -
属性の個数を返します。
...ます。
//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
p a.attributes.length # => 3
//}...