60件ヒット
[1-60件を表示]
(0.194秒)
種類
- インスタンスメソッド (36)
- 特異メソッド (24)
ライブラリ
-
rexml
/ document (60)
キーワード
- new (12)
-
to
_ s (12) - unnormalize (12)
- value (12)
- value= (12)
検索結果
先頭5件
- REXML
:: Text # to _ s -> String - REXML
:: Text . unnormalize(string , doctype = nil , filter = nil , illegal = nil) -> String - REXML
:: Text # value -> String - REXML
:: Text . new(arg , respect _ whitespace = false , parent = nil , raw = nil , entity _ filter = nil , illegal = REXML :: Text :: NEEDS _ A _ SECOND _ CHECK) - REXML
:: Text # value=(val)
-
REXML
:: Text # to _ s -> String (6125.0) -
テキストの内容を正規化(すべての実体をエスケープ)された状態で返します。
...トとして妥当です。
結果は REXML::Text.new で指定した entity_filter を反映しています。
@see REXML::Text#value
//emlist[][ruby]{
require 'rexml/document'
t = REXML::Text.new("< & foobar", false, nil, false)
t.to_s # => "< & foobar"
t.value # => "< & foobar"
//}... -
REXML
:: Text . unnormalize(string , doctype = nil , filter = nil , illegal = nil) -> String (3207.0) -
string を非正規化(すべての entity をアンエスケープ)したものを 返します。
...string を非正規化(すべての entity をアンエスケープ)したものを
返します。
filter でアンエスケープしない実体の実体名を文字列配列で指定します。
@param string 非正規化する文字列
@param doctype DTD(REXML::DocType オブジェクト)
@par......filter アンエスケープしない実体の実体名(文字列配列)
@param illegal 内部用。使わないでください。
//emlist[][ruby]{
require 'rexml/text'
REXML::Text.unnormalize("& &foobar; <") # => "& &foobar; <"
REXML::Text.unnormalize("< >", nil, ["lt"]) # => "< >... -
REXML
:: Text # value -> String (3125.0) -
テキストの内容を非正規化(すべての実体をアンエスケープ)された状態で返します。
...。
このメソッドの返り値では raw モードや entity_filter は無視されます。
@see REXML::Text#raw, REXML::Text#to_s
//emlist[][ruby]{
require 'rexml/document'
t = REXML::Text.new("< & foobar", false, nil, false)
t.to_s # => "< & foobar"
t.value # => "< & foobar"
//}... -
REXML
:: Text . new(arg , respect _ whitespace = false , parent = nil , raw = nil , entity _ filter = nil , illegal = REXML :: Text :: NEEDS _ A _ SECOND _ CHECK) (3113.0) -
テキストノードオブジェクトを生成します。
...として使われます。
REXML::Text オブジェクトの場合はその内容が複製されます。
respect_whitespace に真を指定すると、arg に含まれる空白文字は保存されます。
偽の場合は空白はまとめられます。
raw は true, false, nil のいずれか......を指定し、生成されるテキストノードが
raw モードであるかどうかを決めます。
true の場合、そのノードは raw モードであると解釈され、
テキストにはエスケープされていないXMLマークアップは
含まれていないと仮定し、テ......@param entity_filter 置換したい実体の名前の配列
@param illegal ライブラリ内部用
@raise RuntimeError テキストがXMLのテキストとして不正な
文字を含んでいる場合に発生します。
//emlist[doctype なしの場合][ruby]{
p REXML::Text.new("<&", f... -
REXML
:: Text # value=(val) (3007.0) -
テキストの内容を val に変更します。
...非正規化された(エスケープされていない)文字列を渡さなければ
なりません。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("a")
e.add_text("foo")
e[0].value = "bar"
e.to_s # => "<a>bar</a>"
e[0].value = "<a>"
e.to_s # => "<a><a></a>"
//}...