3件ヒット
[1-3件を表示]
(0.148秒)
ライブラリ
-
rexml
/ document (3)
キーワード
- add (1)
- delete (1)
-
delete
_ all (1)
検索結果
先頭3件
-
REXML
:: Attributes # delete(attribute) -> REXML :: Element (46207.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
:: Attributes # delete _ all(name) -> [REXML :: Attribute] (45907.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... -
REXML
:: Attributes # add(attribute) -> () (27607.0) -
属性を追加/更新します。
...ブジェクト)を
指定します。既に同じ名前(REXML::Attribute#name)のオブジェクトが
存在する場合は属性が上書きされ、ない場合は追加されます。
@param attribute 追加(更新)する属性(REXML::Attribute オブジェクト)
@see REXML::Attributes#[]=...