るりまサーチ

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

別のキーワード

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

ライブラリ

キーワード

検索結果

REXML::Document#stand_alone? -> String (6202.0)

XML 宣言の standalone の値を文字列で返します。

...XML 宣言の standalone の値を文字列で返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<e />
EOS
doc.stand_alone? # => "yes"
//}...

REXML::Document#version -> String (6202.0)

XML 宣言に含まれている XML 文書のバージョンを返します。

...XML 宣言を持たない場合はデフォルトの値
(REXML::XMLDecl.defaultで宣言されているもの)を返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<e />
EOS
doc.version # => "1.0"
//}...

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

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

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

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

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

: :respect_whitesp...
...@param source XML文書(文字列, IO)もしくは REXML::Document オブジェクト
@param context コンテキスト
@raise REXML::ParseException XML文書のパースに失敗した場合に発生します
@raise REXML::UndefinedNamespaceException XML文書のパース中に、定義されてい...