るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.106秒)

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. kernel $-i
  5. matrix i

検索結果

REXML::Formatters::Transitive.new(indentation=2, ie_hack=false) -> REXML::Formatter::Transitive (24302.0)

フォーマッタオブジェクトを生成して返します。

...

i
ndentation でインデント幅を指定できます。

i
e_hack に真を渡すと、空のタグを閉じる前で空白を挿入します。
これは特定のバージョンのIEのXMLパーサのバグを避けるための機能です。

@param indentation インデント幅
@param ie_h...

REXML::Formatters::Transitive (24054.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::DocType#write(output, indent = 0, transitive = false, ie_hack = false) -> () (6313.0)

output に DTD を出力します。

...utput 出力先の IO オブジェクト
@param indent インデントの深さ。指定しないでください。
@param transitive 無視されます。指定しないでください。
@param ie_hack 無視されます。指定しないでください。

//emlist[][ruby]{
require 'rexml/documen...
...ument.new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT 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(ST...