Ruby 2.3.0 リファレンスマニュアル > ライブラリ一覧 > rexml/documentライブラリ > REXML::CDataクラス > to_s
to_s -> String
[permalink][rdoc]value -> String
テキスト文字列を返します。
[SEE_ALSO] REXML::Text#value, REXML::Text#to_s
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"