るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils rm_r
  5. fileutils cp_r

ライブラリ

クラス

検索結果

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

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

...空間の prefix をキーとし、URI を値とする
Hash を返します。

//emlist[][ruby]{
r
equire '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='&lt;'/>
</root>
EOS
a = do...
...c.get_elements("/root/a").first

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