るりまサーチ (Ruby 2.2.0)

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

別のキーワード

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

キーワード

検索結果

REXML::Document#encoding -> String (54646.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 />
EO...

REXML::XMLDecl#encoding -> String | nil (54610.0)

設定されているエンコーディングの名前を文字列で返します。

設定されているエンコーディングの名前を文字列で返します。

エンコーディングが指定されていない(デフォルトの UTF-8 とみなされます)
場合は nil を返します。

REXML::Document#stand_alone? -> String (325.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 (325.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 />
EO...

REXML::Instruction#content -> String | nil (325.0)

XML 処理命令の内容を返します。

...XML 処理命令の内容を返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<?foobar?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-...

絞り込み条件を変える

REXML::Instruction#target -> String (325.0)

XML 処理命令のターゲットを返します。

...XML 処理命令のターゲットを返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/css" href="style.css"?>
<root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-st...