132件ヒット
[101-132件を表示]
(0.085秒)
別のキーワード
ライブラリ
-
rexml
/ document (132)
クラス
-
REXML
:: Attribute (12) -
REXML
:: Attributes (48) -
REXML
:: Element (72)
キーワード
-
add
_ namespace (24) - attribute (12)
-
delete
_ namespace (12) - each (12)
-
each
_ attribute (12) -
get
_ attribute _ ns (12) - namespaces (24)
検索結果
先頭3件
-
REXML
:: Element # attribute(name , namespace = nil) -> REXML :: Attribute | nil (132.0) -
name で指定される属性を返します。
...きます。
namespace で名前空間の URI を指定することで、その名前空間内で
name という属性名を持つ属性を指定できます。
指定した属性名の属性がない場合は nil を返します。
@param name 属性名(文字列)
@param namespace 名前空間......のURI(文字列)
//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
a.attribute("att") # => att='... -
REXML
:: Attributes # each {|name , value| . . . } -> () (25.0) -
各属性の名前と値に対しブロックを呼び出します。
...各属性の名前と値に対しブロックを呼び出します。
名前には expanded_name(REXML::Namespace#exapnded_name)が
渡されます。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://examp... -
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (25.0) -
各属性に対しブロックを呼び出します。
...[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
a.attributes.each_attribute do |attr|
p [attr.namespace...