るりまサーチ

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

別のキーワード

  1. document root
  2. pstore root?
  3. psych root
  4. pathname root?
  5. rexml/document root

ライブラリ

クラス

検索結果

REXML::Elements#to_a(xpath = nil) -> [REXML::Element] (18138.0)

すべての子要素の配列を返します。

...path XPath文字列

//emlist[][ruby]{
require 'rexml/document'
require 'rexml/xpath'
doc = REXML::Document.new '<a>sean<b/>elliott<c/></a>'
doc.root.elements.to_a # => [<b/>, <c/>]
doc.root.elements.to_a("child::node()") # => [<b/>, <c/>]
REXML::XPath.match(doc.root, "child::node()") # => ["sean"...

REXML::Attributes#to_a -> [Attribute] (18120.0)

属性の配列を返します。

...属性の配列を返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a x='1' y='2' z='3' />")
doc.root.attributes.to_a # => [x='1', y='2', z='3']
//}...