66件ヒット
[1-66件を表示]
(0.128秒)
種類
- インスタンスメソッド (44)
- 特異メソッド (11)
- クラス (11)
ライブラリ
-
rexml
/ document (66)
クラス
-
REXML
:: DocType (11) -
REXML
:: Document (22) -
REXML
:: Element (11) -
REXML
:: Formatters :: Transitive (11)
検索結果
先頭5件
- REXML
:: Formatters :: Transitive - REXML
:: Document # write(output = $ stdout , indent = -1 , transitive = false , ie _ hack = false , encoding=nil) -> () - REXML
:: Document # write(output: $ stdout , indent: -1 , transitive: false , ie _ hack: false , encoding: nil) -> () - REXML
:: DocType # write(output , indent = 0 , transitive = false , ie _ hack = false) -> () - REXML
:: Element # write(output = $ stdout , indent = -1 , transitive = false , ie _ hack = false)
-
REXML
:: Formatters :: Transitive (24030.0) -
XMLドキュメントをテキストの内容を変えずに 多少の整形を加えて出力するクラスです。
...。
//emlist[][ruby]{
require 'rexml/document'
require 'rexml/formatters/transitive'
doc = REXML::Document.new <<EOS
<root><children>
<grandchildren foo='bar' />
</children></root>
EOS
transitive_formatter = REXML::Formatters::Transitive.new
output = StringIO.new
transitive_formatter.write(doc, ou......tring
# => "<root\n><children\n >\n<grandchildren foo='bar'\n />\n</children\n ></root\n>\n"
print output.string
# >> <root
# >> ><children
# >> >
# >> <grandchildren foo='bar'
# >> />
# >> </children
# >> ></root
# >> >
output = StringIO.new
transitive_formatter.write(REXML::XPath.fir......st(doc, "/root/children"), output)
output.string
# => "<children\n>\n<grandchildren foo='bar'\n />\n</children\n>"
//}... -
REXML
:: Document # write(output = $ stdout , indent = -1 , transitive = false , ie _ hack = false , encoding=nil) -> () (6308.0) -
output に XML 文書を出力します。
...数による引数指定が可能です。
@param output 出力先(IO のように << で書き込めるオブジェクト)
@param indent インデントのスペースの数(-1 だとインデントしない)
@param transitive XMLではインデントのスペースでDOMが変化してしまう......に真を渡すと、XMLのDOMに余計な要素が加わらないように
空白の出力を適当に抑制するようになる
@param ie_hack IEはバージョンによってはXMLをちゃんと解釈できないので、
それに対応したXMLを出力するかどうかを真... -
REXML
:: Document # write(output: $ stdout , indent: -1 , transitive: false , ie _ hack: false , encoding: nil) -> () (6308.0) -
output に XML 文書を出力します。
...数による引数指定が可能です。
@param output 出力先(IO のように << で書き込めるオブジェクト)
@param indent インデントのスペースの数(-1 だとインデントしない)
@param transitive XMLではインデントのスペースでDOMが変化してしまう......に真を渡すと、XMLのDOMに余計な要素が加わらないように
空白の出力を適当に抑制するようになる
@param ie_hack IEはバージョンによってはXMLをちゃんと解釈できないので、
それに対応したXMLを出力するかどうかを真... -
REXML
:: DocType # write(output , indent = 0 , transitive = false , ie _ hack = false) -> () (6307.0) -
output に DTD を出力します。
...utput 出力先の IO オブジェクト
@param indent インデントの深さ。指定しないでください。
@param transitive 無視されます。指定しないでください。
@param ie_hack 無視されます。指定しないでください。
//emlist[][ruby]{
require 'rexml/documen......ENT book (comment)>
<!ELEMENT comment (#PCDATA)>
<!ATTLIST book
author CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
<!ENTITY p "foobar publisher">
<!ENTITY % q "quzz">
]>
EOS
doctype.write(STDOUT)
# =>
# <!DOCTYPE books [
# <!ELEMENT book (... -
REXML
:: Element # write(output = $ stdout , indent = -1 , transitive = false , ie _ hack = false) (6307.0) -
このメソッドは deprecated です。 REXML::Formatter を代わりに 使ってください。
...のを(子要素を含め)出力します。
@param output 出力先(IO のように << で書き込めるオブジェクト)
@param indent インデントのスペースの数(-1 だとインデントしない)
@param transitive XMLではインデントのスペースでDOMが変化してしまう......に真を渡すと、XMLのDOMに余計な要素が加わらないように
空白の出力を適当に抑制するようになる
@param ie_hack IEはバージョンによってはXMLをちゃんと解釈できないので、
それに対応したXMLを出力するかどうかを真... -
REXML
:: Formatters :: Transitive . new(indentation=2 , ie _ hack=false) -> REXML :: Formatter :: Transitive (6201.0) -
フォーマッタオブジェクトを生成して返します。
...。
indentation でインデント幅を指定できます。
ie_hack に真を渡すと、空のタグを閉じる前で空白を挿入します。
これは特定のバージョンのIEのXMLパーサのバグを避けるための機能です。
@param indentation インデント幅
@param ie_h...