るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.102秒)

別のキーワード

  1. pstore root?
  2. document root
  3. psych root
  4. pathname root?
  5. rexml/document root

ライブラリ

クラス

検索結果

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

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

...w(<<EOS)
<root 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.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", "<"]
//}...