7件ヒット
[1-7件を表示]
(0.101秒)
ライブラリ
- ビルトイン (2)
-
rexml
/ document (5)
クラス
キーワード
- content (1)
-
destination
_ encoding _ name (1) -
error
_ char (1) -
stand
_ alone? (1) - target (1)
検索結果
先頭5件
-
REXML
:: Document # encoding -> String (54664.0) -
XML 宣言に含まれている XML 文書のエンコーディングを返します。
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.encoding # => "UTF-8"
//} -
REXML
:: Document # version -> String (54664.0) -
XML 宣言に含まれている XML 文書のバージョンを返します。
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"
//} -
Encoding
:: UndefinedConversionError # destination _ encoding _ name -> String (36646.0) -
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
@see Encoding::UndefinedConversionError#destination_encoding -
Encoding
:: UndefinedConversionError # error _ char -> String (18343.0) -
エラーを発生させた1文字を文字列で返します。
エラーを発生させた1文字を文字列で返します。
//emlist[例][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
begin
ec.convert("\u{a0}")
rescue Encoding::UndefinedConversionError
puts $!.error_char.dump #=> "\u{a0}"
end
//} -
REXML
:: Document # stand _ alone? -> String (343.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
:: Instruction # content -> String | nil (343.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-stylesheet"
doc[2].content... -
REXML
:: Instruction # target -> String (343.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-stylesheet"
doc[2].content # => "t...