24件ヒット
[1-24件を表示]
(0.022秒)
ライブラリ
-
rexml
/ document (24)
クラス
-
REXML
:: Attributes (12) -
REXML
:: Elements (12)
検索結果
-
REXML
:: Elements # to _ a(xpath = nil) -> [REXML :: Element] (18131.0) -
すべての子要素の配列を返します。
...][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", <b/>, "elliott", <c/>]
//}... -
REXML
:: Attributes # to _ a -> [Attribute] (18113.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']
//}...