るりまサーチ (Ruby 2.2.0)

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

別のキーワード

  1. io popen
  2. io pipe
  3. io each_line
  4. io readlines
  5. io each

検索結果

REXML::Document#version -> String (18325.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::Instruction (18025.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::Instruction#content -> String | nil (9025.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 (9025.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.new(version = REXML::XMLDecl::DEFAULT_VERSION, encoding = nil, standalone = nil) (928.0)

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

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

version 以外は省略可能です。

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

絞り込み条件を変える

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

内容を更新します。

内容を更新します。

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

REXML::Document#write(output = $stdout, indent = -1, transitive = false, ie_hack = false, encoding=nil) -> () (331.0)

output に XML 文書を出力します。

output に XML 文書を出力します。

XML宣言、DTD、処理命令を(もしあるならば)含む文書を出力します。

注意すべき点として、
元の XML 文書が XML宣言を含んでいなくとも
出力される XML はデフォルトの XML 宣言を含んでいるべきであるが、
REXML は明示しない限り(つまりXML宣言を REXML::Document#add で
追加しない限り)
それをしない、ということである。XML-RPCのような利用法では
ネットワークバンドを少しでも節約する必要があるためである。

2.0.0以降ではキーワード引数による引数指定が可能です。

@param outpu...

REXML::Document#write(output: $stdout, indent: -1, transitive: false, ie_hack: false, encoding: nil) -> () (331.0)

output に XML 文書を出力します。

output に XML 文書を出力します。

XML宣言、DTD、処理命令を(もしあるならば)含む文書を出力します。

注意すべき点として、
元の XML 文書が XML宣言を含んでいなくとも
出力される XML はデフォルトの XML 宣言を含んでいるべきであるが、
REXML は明示しない限り(つまりXML宣言を REXML::Document#add で
追加しない限り)
それをしない、ということである。XML-RPCのような利用法では
ネットワークバンドを少しでも節約する必要があるためである。

2.0.0以降ではキーワード引数による引数指定が可能です。

@param outpu...