12件ヒット
[1-12件を表示]
(0.172秒)
別のキーワード
ライブラリ
-
rexml
/ document (12)
クラス
-
REXML
:: Element (12)
検索結果
-
REXML
:: Element # text(path = nil) -> String | nil (24577.0) -
先頭のテキスト子ノードの文字列を返します。
...:Text#value も参照してください。
path を渡した場合は、その XPath 文字列で指定される
テキストノードの文字列を返します。
テキストノードがない場合には nil を返します。
@param path XPath文字列
@see REXML::Element#get_text
//emlist[......][ruby]{
require 'rexml/document'
doc = REXML::Document.new "<p>some text <b>this is bold!</b> more text</p>"
# doc.root (<p> ... </p>) は2つのテキストノード("some text " と " more text"
# を持っているが、前者を返す
doc.root.text # => "some text "
//}...