るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.153秒)
トップページ > クエリ:l[x] > クエリ:children[x] > クエリ:Element[x]

別のキーワード

  1. _builtin $-l
  2. matrix l
  3. kernel $-l
  4. lupdecomposition l
  5. $-l kernel

ライブラリ

クラス

キーワード

検索結果

REXML::Element (24022.0)

XML の要素(エレメント、element)を表すクラス。

...XML の要素(エレメント、element)を表すクラス。

要素は
* 子要素(children)
* 属性(attributes)
* 名前(name)
を持つものとして特徴付けられます。

また、要素はある別の要素の子となることもできます。...

REXML::Element#root -> REXML::Element (6249.0)

self が属する文書のルート要素を返します。

...self が属する文書のルート要素を返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root>
<children>
<grandchildren />
</children>
</root>
EOS

children
= doc.get_elements("/root/children").first
children
.name # => "children"
children
.root.name...
...# => "root"
grandchildren = doc.get_elements("/root/children/grandchildren").first
grandchildren.name # => "grandchildren"
grandchildren.root.name # => "root"
//}...

REXML::Element#root_node -> REXML::Document | REXML::Node (6248.0)

self が属する文書のルートノードを返します。

...self が属する文書のルートノードを返します。

通常はその要素が属する文書(REXML::Document) オブジェクトが
返されます。

その要素が属する REXML::Document オブジェクトが存在しない
場合は木構造上のルートノードが返されま...
...emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root>
<children>
<grandchildren />
</children>
</root>
EOS

children
= doc.get_elements("/root/children").first
children
.name # => "children"
children
.root_node == doc # => true
grandchildren = doc.get_elements("/root/child...
...ren/grandchildren").first
grandchildren.name # => "grandchildren"
grandchildren.root_node == doc # => true
//}...