24件ヒット
[1-24件を表示]
(0.077秒)
ライブラリ
-
rexml
/ document (24)
クラス
-
REXML
:: Attribute (12) -
REXML
:: Attributes (12)
検索結果
先頭2件
-
REXML
:: Attribute # namespace(arg = nil) -> String | nil (21322.0) -
属性の名前空間の URI を返します。
...略します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("xmlns:ns", "http://www.example.com/ns")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").prefix # => "ns"
p e.attributes.get_attribute("r").namespace # => "http://www.example.c... -
REXML
:: Attributes # namespaces -> { String => String } (9517.0) -
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='<'/>
</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
# => {}
//}...