22件ヒット
[1-22件を表示]
(0.014秒)
別のキーワード
種類
- インスタンスメソッド (11)
- 特異メソッド (11)
ライブラリ
-
rexml
/ document (22)
クラス
-
REXML
:: Attributes (11) -
REXML
:: XPath (11)
検索結果
先頭2件
-
REXML
:: XPath . first(element , path = nil , namespaces = {} , variables = {}) -> Node | nil (18238.0) -
element の path で指定した XPath 文字列にマッチする最初のノードを 返します。
...<a> ... </>
b1 = REXML::XPath.first(a, "b")
b1.text # => "b1"
REXML::XPath.first(doc, "/root/a/x:c") # => <x:c/>
REXML::XPath.first(a, "x:c") # => <x:c/>
REXML::XPath.first(a, "y:c") # => nil
REXML::XPath.first(a, "y:c", {"y" => "1"}) # => <x:c/>
b2 = REXML::XPath.first(doc, "/root/a/b[text()=$v]",... -
REXML
:: Attributes # namespaces -> { String => String } (18119.0) -
self の中で宣言されている名前空間の集合を返します。
...p://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 doc.root.attributes.namespaces
# => {"foo"=>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}...