るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.169秒)
トップページ > クエリ:i[x] > クエリ:l[x] > クエリ:get_text[x]

別のキーワード

  1. kernel $-l
  2. matrix l
  3. _builtin $-l
  4. lupdecomposition l
  5. $-l kernel

ライブラリ

クラス

検索結果

REXML::Element#get_text(path = nil) -> REXML::Text | nil (21407.0)

先頭のテキスト子ノードを返します。

...EXML::Text#value も参照してください。

path を渡した場合は、その XPath 文字列で指定される
テキストノードの文字列を返します。

テキストノードがない場合には nil を返します。

@param path XPath文字列
@see REXML::Element#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.get_text.value # => "some text "
//}...

REXML::Element#text(path = nil) -> String | nil (3306.0)

先頭のテキスト子ノードの文字列を返します。

...ML::Text#value も参照してください。

path を渡した場合は、その XPath 文字列で指定される
テキストノードの文字列を返します。

テキストノードがない場合には nil を返します。

@param path XPath文字列
@see REXML::Element#get_text

//emli...
...st[][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 "
//}...