るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.039秒)
トップページ > バージョン:2.3.0[x] > クエリ:new[x] > クラス:REXML::CData[x]

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

キーワード

検索結果

REXML::CData.new(text, respect_whitespace = true, parent = nil) -> REXML::CData (54397.0)

text をテキストとして持つ CData オブジェクトを生成します。

...nt.new(<<EOS)
<root />
EOS
doc.root.add(REXML::CData.new("foo bar baz "))
doc.to_s # => "<root><![CDATA[foo bar baz ]]></root>\n"

doc = REXML::Document.new(<<EOS)
<root />
EOS
doc.root.add(REXML::CData.new("foo bar baz ", true))
doc.root.add(REXML::CData.new("foo bar baz ", false))
doc.to_s...

REXML::CData#to_s -> String (22.0)

テキスト文字列を返します。

...テキスト文字列を返します。

@see REXML::Text#value, REXML::Text#to_s

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root><![CDATA[foobar baz]]></root>
EOS
doc.root[0].class # => REXML::CData
doc.root[0].value # => "foobar baz"
//}...

REXML::CData#value -> String (22.0)

テキスト文字列を返します。

...テキスト文字列を返します。

@see REXML::Text#value, REXML::Text#to_s

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root><![CDATA[foobar baz]]></root>
EOS
doc.root[0].class # => REXML::CData
doc.root[0].value # => "foobar baz"
//}...