るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.060秒)
トップページ > バージョン:2.6.0[x] > クエリ:String[x] > クエリ:get[x] > クラス:REXML::Attributes[x]

別のキーワード

  1. string []=
  2. string []
  3. string slice
  4. string slice!
  5. string gsub

ライブラリ

キーワード

検索結果

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

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

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.ge...

REXML::Attributes#[](name) -> String | nil (343.0)

属性名nameの属性値を返します。

...属性名nameの属性値を返します。

属性値ではなく REXML::Attribute オブジェクトが必要な場合は
REXML::Attributes
#get_attribute を使ってください。

nameという属性名の属性がない場合は nil を返します。

@param name 属性名(文字列)

//emlis...

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

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

self の中で宣言されている 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...