12件ヒット
[1-12件を表示]
(0.141秒)
ライブラリ
-
rexml
/ document (12)
クラス
-
REXML
:: Element (12)
検索結果
-
REXML
:: Element # text(path = nil) -> String | nil (21476.0) -
先頭のテキスト子ノードの文字列を返します。
...セスできないことに注意してください。
raw モードの設定は無視され、常に正規化されたテキストを返します。
REXML::Text#value も参照してください。
path を渡した場合は、その XPath 文字列で指定される
テキストノードの文......返します。
@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 "
//}...