るりまサーチ (Ruby 2.4.0)

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

別のキーワード

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

ライブラリ

キーワード

検索結果

REXML::Document#expanded_name -> String (310.0)

""(空文字列)を返します。

""(空文字列)を返します。

XMLの仕様上、このオブジェクトはexpanded name名前を持ちえません。

REXML::Document#name -> String (310.0)

""(空文字列)を返します。

""(空文字列)を返します。

XMLの仕様上、このオブジェクトはexpanded name名前を持ちえません。

REXML::Document#encoding -> String (307.0)

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.encoding # => "UTF-8"
//}...

REXML::Document#stand_alone? -> String (307.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 (307.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 (22.0)

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

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

source には String、IO、REXML::Document のいずかが
指定できます。 REXML::Document を指定すると
コンテキストと要素、属性が複製されます。
文字列の場合はそれを XML と見なしてパースします。...
...字は一切変換されません。
REXML::Element#raw も参照してください。

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