2件ヒット
[1-2件を表示]
(0.016秒)
クラス
-
REXML
:: Attributes (1) -
REXML
:: Element (1)
キーワード
-
add
_ attributes (1) - namespaces (1)
検索結果
先頭2件
-
REXML
:: Element # add _ attributes(attrs) -> () (18400.0) -
要素の属性を複数追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...属性を指定します。
@param attrs 追加する属性の属性名と属性値の対の集合(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([... -
REXML
:: Attributes # namespaces -> { String => String } (9061.0) -
self の中で宣言されている名前空間の集合を返します。
...返します。
返り値は名前空間の prefix をキーとし、URI を値とする
Hash を返します。
//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=...