12件ヒット
[1-12件を表示]
(0.241秒)
ライブラリ
-
rexml
/ document (12)
クラス
-
REXML
:: Attributes (12)
検索結果
-
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (18137.0) -
namespace と name で特定される属性を返します。
...えてしまった場合でも、このメソッドを
使うことで属性を正しく指定することができます。
@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<-EOS)
<root xmlns:foo=......ements("/root/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") #...