11件ヒット
[1-11件を表示]
(0.437秒)
ライブラリ
-
rexml
/ document (11)
クラス
-
REXML
:: Attributes (11)
検索結果
-
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (36632.0) -
namespace と name で特定される属性を返します。
...espace 名前空間(URI, 文字列)
@param name 属性名(文字列)
//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_ele......ot/a").first
a.attributes.get_attribute_ns("", "att") # => att='<'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt") # => nil
//}...