るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.010秒)
トップページ > クエリ:element[x] > 種類:インスタンスメソッド[x] > クラス:REXML::Attributes[x]

別のキーワード

  1. cgi element_init
  2. cgi/html element_init
  3. matrix element
  4. rss element
  5. cgi escape_element

ライブラリ

検索結果

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

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

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

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

@param attribute 取り除く属性(文字列もしくは REXML::Attribute オブジェクト)

//emlist[][ruby]{
require 'rexm...
...oot xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<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...