るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.056秒)

別のキーワード

  1. attribute new
  2. rexml/document add_attribute
  3. rexml/document attribute
  4. attribute value
  5. element add_attribute

ライブラリ

クラス

検索結果

REXML::Attributes#delete(attribute) -> REXML::Element (21275.0)

指定した属性を取り除きます。

...り除きます。

attribute
で取り除く属性を指定します。
文字列もしくは REXML::Attribute オブジェクトを指定します

self が属する要素(REXML::Element)を返します。

@param attribute 取り除く属性(文字列もしくは REXML::Attribute オブジェク...
...<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

a.attributes.delete("att") # => <a foo:att='1' bar:att='2'/>
a.attributes.delete("foo:att") # => <a bar:att='2'/>
attr = a.attributes.get_attribute("bar:att")
a.attributes.delete(attr) # => <a/>
//}...