るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.144秒)
トップページ > クエリ:t[x] > クエリ:String[x] > 種類:インスタンスメソッド[x] > クエリ:prefix[x] > クラス:REXML::Attributes[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle type_size_t

ライブラリ

キーワード

検索結果

REXML::Attributes#prefixes -> [String] (9319.0)

self の中で宣言されている prefix の集合を 文字列の配列で返します。

... prefix の集合を
文字列の配列で返します。

self が属する要素より上位の要素で定義されているものは含みません。

//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='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

p doc.root.attributes.prefixes # => ["foo", "bar"]
p a.attributes.prefixes # => []
//}...

REXML::Attributes#namespaces -> { String => String } (3410.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='2' att='&lt;'/>
</root>
EOS
a = doc.get_ele...
...ments("/root/a").first

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