312件ヒット
[301-312件を表示]
(0.032秒)
別のキーワード
クラス
-
REXML
:: Attribute (24) -
REXML
:: Attributes (96) -
REXML
:: DocType (48) -
REXML
:: Element (132) -
REXML
:: Elements (12)
キーワード
- [] (24)
- []= (12)
-
add
_ attributes (12) -
add
_ namespace (24) - attribute (12)
-
attributes
_ of (12) -
delete
_ all (12) -
delete
_ namespace (12) - each (12)
-
each
_ attribute (12) -
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) - entity (12)
-
external
_ id (12) -
get
_ attribute (12) -
get
_ attribute _ ns (12) - namespace (24)
- namespaces (24)
- root (12)
-
root
_ node (12) -
to
_ string (12)
検索結果
-
REXML
:: Attributes # each _ attribute {|attribute| . . . } -> () (21.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.namespa......ce, attr.name, attr.value]
end
# => ["http://example.org/foo", "att", "1"]
# => ["http://example.org/bar", "att", "2"]
# => ["", "att", "<"]
//}...