2件ヒット
[1-2件を表示]
(0.114秒)
ライブラリ
-
rexml
/ document (2)
クラス
-
REXML
:: Attributes (1) -
REXML
:: Element (1)
検索結果
先頭2件
-
REXML
:: Attributes # namespaces -> { String => String } (73249.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='<'/>
</root>
EOS
a = doc.ge... -
REXML
:: Element # namespaces -> {String => String} (73231.0) -
self の文脈で定義されている名前空間の情報を返します。
self の文脈で定義されている名前空間の情報を返します。
対象の要素とその外側の要素で定義されている名前空間を、{ prefix => 識別子 }
というハッシュテーブルで返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
doc.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"}
//}