3件ヒット
[1-3件を表示]
(0.175秒)
ライブラリ
-
rexml
/ document (3)
キーワード
-
each
_ element _ with _ text (1) -
get
_ text (1)
検索結果
先頭3件
-
REXML
:: Element # text(path = nil) -> String | nil (64126.0) -
先頭のテキスト子ノードの文字列を返します。
...トノードの文字列を返します。
テキストノードがない場合には 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 (<... -
REXML
:: Element # each _ element _ with _ text(text = nil , max = 0 , name = nil) {|element| . . . } -> () (37411.0) -
テキストを子ノードとして 持つすべての子要素を引数としてブロックを呼び出します。
テキストを子ノードとして
持つすべての子要素を引数としてブロックを呼び出します。
text を指定すると、テキストの内容が text であるもののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対象となります。
name を指定すると、それは xpath 文字列と見なされ、
それにマッチするもののみが対象となります。
max に 0 を指定すると、max の指定は無視されます(0個ではありません)。
@param text テキストの中身(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
... -
REXML
:: Element # get _ text(path = nil) -> REXML :: Text | nil (28429.0) -
先頭のテキスト子ノードを返します。
...トノードの文字列を返します。
テキストノードがない場合には 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> ....