るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
7件ヒット [1-7件を表示] (0.038秒)

別のキーワード

  1. string []=
  2. string []
  3. string slice
  4. string slice!
  5. string gsub

キーワード

検索結果

REXML::Text.unnormalize(string, doctype = nil, filter = nil, illegal = nil) -> String (682.0)

string を非正規化(すべての entity をアンエスケープ)したものを 返します。

string を非正規化(すべての entity をアンエスケープ)したものを
返します。

filter でアンエスケープしない実体の実体名を文字列配列で指定します。

@param string 非正規化する文字列
@param doctype DTD(REXML::DocType オブジェクト)
@param filter アンエスケープしない実体の実体名(文字列配列)
@param illegal 内部用。使わないでください。

//emlist[][ruby]{
require 'rexml/text'
REXML::Text.unnormalize("& &foobar; ...

REXML::Entity.matches?(string) -> bool (379.0)

string が実体宣言の文法に従う文字列であれば真を返します。

...実体宣言の文法に従う文字列であれば真を返します。

@param string 判定対象の文字列

//emlist[][ruby]{
require 'rexml/document'

p REXML::Entity.matches?('<!ENTITY s "seal">') # => true
p REXML::Entity.matches?('<!ENTITY % s "seal">') # => true
p REXML::Entity.matches?('...

REXML::Comment.new(string, parent = nil) -> REXML::Comment (331.0)

Comment オブジェクトを生成します。

Comment オブジェクトを生成します。

引数に REXML::Comment オブジェクトを渡すとその内容が複製されます
(親ノードの情報は複製されません)。

@param string コメント文字列
@param comment REXML::Comment オブジェクト
@param parent 親ノード

REXML::Text.normalize(input, doctype = nil, entity_filter = nil) -> String (313.0)

input を正規化(すべての entity をエスケープ)したものを 返します。

input を正規化(すべての entity をエスケープ)したものを
返します。

@param input 正規化する文字列
@param doctype DTD(REXML::DocType オブジェクト)
@param entity_filter 置換したい実体の名前の配列

REXML::Comment.new(comment, parent = nil) -> REXML::Comment (31.0)

Comment オブジェクトを生成します。

Comment オブジェクトを生成します。

引数に REXML::Comment オブジェクトを渡すとその内容が複製されます
(親ノードの情報は複製されません)。

@param string コメント文字列
@param comment REXML::Comment オブジェクト
@param parent 親ノード

絞り込み条件を変える

REXML::Document.new(source = nil, context = {}) -> REXML::Document (28.0)

Document オブジェクトを生成します。

Document オブジェクトを生成します。

source には String、IO、REXML::Document のいずかが
指定できます。 REXML::Document を指定すると
コンテキストと要素、属性が複製されます。
文字列の場合はそれを XML と見なしてパースします。
IOの場合は、XML文書を読み出してパースします。

context で「コンテキスト」を指定します。テキストノードの空白や
特殊文字の取り扱いを Hash で指定します。
以下の Symbol をハッシュのキーとして使います。

: :respect_whitespace
空白を考慮して欲しい要素の名...

REXML::Element.new(arg = UNDEFINED, parent = nil, context = nil) -> REXML::Element (28.0)

要素オブジェクトを生成します。

要素オブジェクトを生成します。

arg が文字列の場合、新たな要素の名前は arg に設定されます。
arg が REXML::Element オブジェクトの場合は、
新たな要素の名前、属性、context が arg のもので初期化されます。

parent で親ノードを指定します。

context には hash table で要素のコンテキストを指定します。
基本的には text node (REXML::Text) での特別な文字、特に空白について
の取り扱いを指定できます。
以下の Symbol をハッシュのキーとして使います。

: :respect_whitespace
...