3件ヒット
[1-3件を表示]
(0.206秒)
ライブラリ
-
rexml
/ document (3)
クラス
-
REXML
:: Attributes (2) -
REXML
:: Element (1)
キーワード
-
delete
_ all (1) -
delete
_ attribute (1)
検索結果
先頭3件
-
REXML
:: Attributes # delete(attribute) -> REXML :: Element (82534.0) -
指定した属性を取り除きます。
指定した属性を取り除きます。
attribute で取り除く属性を指定します。
文字列もしくは REXML::Attribute オブジェクトを指定します
self が属する要素(REXML::Element)を返します。
@param attribute 取り除く属性(文字列もしくは REXML::Attribute オブジェクト)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
x... -
REXML
:: Element # delete _ attribute(key) -> REXML :: Attribute | nil (74203.0) -
要素から key という属性名の属性を削除します。
要素から key という属性名の属性を削除します。
削除された属性を返します。
key という属性名の属性が存在しない場合は削除されずに、nil を返します。
@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... -
REXML
:: Attributes # delete _ all(name) -> [REXML :: Attribute] (55336.0) -
name という名前を持つ属性をすべて削除します。
name という名前を持つ属性をすべて削除します。
削除された属性を配列で返します。
@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_elem...