96件ヒット
[1-96件を表示]
(0.033秒)
クラス
-
REXML
:: Attributes (24) -
REXML
:: Elements (24) -
REXML
:: Formatters :: Pretty (12) -
REXML
:: Parent (36)
検索結果
先頭5件
-
REXML
:: Attributes # length -> Integer (211.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 # size -> Integer (211.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
:: Elements # size -> Integer (210.0) -
保持している要素の個数を返します。
...e '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
:: Parent # length -> Integer (205.0) -
保持している子ノードの数を返します。
保持している子ノードの数を返します。 -
REXML
:: Parent # size -> Integer (205.0) -
保持している子ノードの数を返します。
保持している子ノードの数を返します。 -
REXML
:: Elements # index(element) -> Integer (204.0) -
element で指定した要素が何番目の子要素であるかを返します。
element で指定した要素が何番目の子要素であるかを返します。
element が子要素でない場合は -1 を返します。
返り値は 1-origin です。
@param element インデックスを知りたい要素(REXML::Element オブジェクト)
@see REXML::Element#[] -
REXML
:: Formatters :: Pretty # width -> Integer (204.0) -
出力のページ幅を返します。
出力のページ幅を返します。
デフォルトは80です。
@see REXML::Formatters::Pretty#width= -
REXML
:: Parent # index(child) -> Integer | nil (204.0) -
child の子ノード列上での位置を返します。
child の子ノード列上での位置を返します。
child が子ノードでない場合には nil を返します。