るりまサーチ

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

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. l

ライブラリ

検索結果

REXML::Attributes#namespaces -> { String => String } (3007.0)

self の中で宣言されている名前空間の集合を返します。

...elf の中で宣言されている名前空間の集合を返します。

返り値は名前空間の prefix をキーとし、URI を値とする
Hash
を返します。

//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xml...
...ns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

p doc.root.attributes.namespaces
# => {"foo"=>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}...