るりまサーチ

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.037秒)
トップページ > クエリ:param[x] > クエリ:get[x] > クラス:REXML::Element[x]

別のキーワード

  1. net/imap param
  2. win32ole win32ole_param
  3. win32ole_param new
  4. win32ole_param name
  5. win32ole_param to_s

ライブラリ

キーワード

検索結果

REXML::Element#get_text(path = nil) -> REXML::Text | nil (6114.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#get_elements(xpath) -> [REXML::Element] (6108.0)

xpath にマッチする要素を配列で返します。

...xpath にマッチする要素を配列で返します。

xpath には XPath 文字列を指定します。

@param xpath XPath 文字列
@see REXML::Elements#to_a...

REXML::Element#attribute(name, namespace = nil) -> REXML::Attribute | nil (19.0)

name で指定される属性を返します。

...いう属性名を持つ属性を指定できます。

指定した属性名の属性がない場合は nil を返します。

@param name 属性名(文字列)
@param namespace 名前空間のURI(文字列)
//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<-EOS)
<root xmlns:f...
...oo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first
a.attribute("att") # => att='&lt;'
a.attribute("att", "http://example.org/bar") # => bar:att='2'
a.attribute("bar:att") # => bar:att='2'
a...

REXML::Element#text(path = nil) -> String | nil (13.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>"...