るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.036秒)
トップページ > クエリ:name[x] > クエリ:Namespace[x] > クエリ:each_attribute[x]

別のキーワード

  1. rexml/document namespace
  2. rake namespace
  3. element add_namespace
  4. rexml/document add_namespace
  5. namespace local_name

ライブラリ

クラス

検索結果

REXML::Attributes#each_attribute {|attribute| ... } -> () (18119.0)

各属性に対しブロックを呼び出します。

...xample.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

a.attributes.each_attribute do |attr|
p [attr.namespace, attr.name, attr.value]
end
# => ["http://example.org/foo", "att", "1"]
# => ["http://example.org/bar", "att", "2"]
# => ["", "att",...