2件ヒット
[1-2件を表示]
(0.149秒)
ライブラリ
-
rexml
/ document (2)
キーワード
-
add
_ attributes (1) -
delete
_ attribute (1)
検索結果
先頭2件
-
REXML
:: Element # delete _ attribute(key) -> REXML :: Attribute | nil (18325.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
:: Element # add _ attributes(attrs) -> () (9043.0) -
要素の属性を複数追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...属性の属性名と属性値の対の集合(Array or Hash)
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("e")
e.add_attributes({"a" => "b", "c" => "d"})
e # => <e a='b' c='d'/>
e = REXML::Element.new("e")
e.add_attributes([["a", "b"], ["c", "d"]])
e # => <e a='b' c='d'/>
//}...