るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
5件ヒット [1-5件を表示] (0.222秒)

別のキーワード

  1. rexml/document new
  2. rexml/document write
  3. rexml/document to_s
  4. rexml/document clone
  5. rexml/document node_type

ライブラリ

検索結果

REXML::Elements#size -> Integer (78361.0)

保持している要素の個数を返します。

保持している要素の個数を返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a>sean<b/>elliott<b/>russell<b/></a>'
# doc.root は3つの要素と3つのテキストノードを持つため、6を返す
doc.root.size # => 6
# そのうち要素は3つであるため、以下は3を返す
doc.root.elements.size # => 3
//}

REXML::Attributes#size -> Integer (69325.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='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

p a.attributes.length # => 3
//}
...

REXML::Parent#size -> Integer (69307.0)

保持している子ノードの数を返します。

保持している子ノードの数を返します。

REXML::Attributes#length -> Integer (24025.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='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first

p a.attributes.length # => 3
//}
...

REXML::Parent#length -> Integer (24007.0)

保持している子ノードの数を返します。

保持している子ノードの数を返します。

絞り込み条件を変える