33件ヒット
[1-33件を表示]
(0.205秒)
ライブラリ
-
rexml
/ document (33)
キーワード
-
get
_ elements (11) -
get
_ text (11) - text (11)
検索結果
先頭3件
-
REXML
:: Element # get _ elements(xpath) -> [REXML :: Element] (15308.0) -
xpath にマッチする要素を配列で返します。
...xpath にマッチする要素を配列で返します。
xpath には XPath 文字列を指定します。
@param xpath XPath 文字列
@see REXML::Elements#to_a... -
REXML
:: Element # get _ text(path = nil) -> REXML :: Text | nil (9308.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> ... </p>)......は2つのテキストノード("some text " と " more text"
# を持っているが、前者を返す
doc.root.get_text.value # => "some text "
//}... -
REXML
:: Element # text(path = nil) -> String | nil (3308.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 (<p> ... </p>)...