るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. openssl version
  2. rss version
  3. rss version=
  4. rss rss_version
  5. zlib zlib_version

検索結果

REXML::Document#version -> String (18346.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::XMLDecl#version -> String (18310.0)

XML文書のバージョンを文字列で返します。

XML文書のバージョンを文字列で返します。

REXML::XMLDecl#version=(value) (18310.0)

XML文書のバージョンを設定します。

XML文書のバージョンを設定します。

@param value 設定値(文字列)

REXML::XMLDecl::DEFAULT_VERSION -> String (18310.0)

REXML::XMLDecl.new や REXML::XMLDecl.default で の使われるデフォルトのXMLバージョン。

REXML::XMLDecl.new や REXML::XMLDecl.default で
の使われるデフォルトのXMLバージョン。

REXML::XMLDecl.new(version = REXML::XMLDecl::DEFAULT_VERSION, encoding = nil, standalone = nil) (649.0)

新たな XMLDecl オブジェクトを生成して返します。

新たな XMLDecl オブジェクトを生成して返します。

version 以外は省略可能です。

@param version バージョン(文字列)
@param encoding エンコーディング(文字列 or nil)
@param standalone スタンドアロン文章かどうか("yes", "no", nil)

絞り込み条件を変える

REXML::XMLDecl#xmldecl(version, encoding, standalone) -> () (328.0)

内容を更新します。

内容を更新します。

@param version バージョン(文字列)
@param encoding エンコーディング(文字列 or nil)
@param standalone スタンドアロン文章かどうか("yes", "no", nil)

REXML::XMLDecl (97.0)

XML 宣言を表すクラス。

...言を表すクラス。

文書から XML 宣言を取り出すには REXML::Document#xml_decl を使います。

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

xml_decl = doc.xml_decl
xml_decl.version...
...> "UTF-8"
xml_decl.standalone # => "yes"
xml_decl.writethis # => true
//}


//emlist[XML 宣言を省略した場合の例。][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<e />
EOS

xml_decl = doc.xml_decl
xml_decl.version # => "1.0"
xml_decl.encoding # => "UTF-8"
xml_decl.stand...

REXML::Instruction (43.0)

XML 処理命令(XML Processing Instruction, XML PI)を表すクラス。

...頭の <?xml version=... ?>)は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[...

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

REXML::XMLDecl#==(other) -> bool (25.0)

self と other が同じであるならば真を返します。

self と other が同じであるならば真を返します。

「同じ」とは REXML::XMLDecl#version, REXML::XMLDecl#encoding,
REXML::XMLDecl#standalone が一致していることを意味します。

@param other 比較対象のオブジェクト