24件ヒット
[1-24件を表示]
(0.051秒)
別のキーワード
ライブラリ
-
rexml
/ document (24)
クラス
-
REXML
:: Attributes (24)
検索結果
-
REXML
:: Attributes # size -> Integer (15138.0) -
属性の個数を返します。
...返します。
//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 a.attributes.length # => 3... -
REXML
:: Attributes # length -> Integer (38.0) -
属性の個数を返します。
...返します。
//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 a.attributes.length # => 3...