るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.086秒)
トップページ > クエリ:l[x] > クエリ:r[x] > クエリ:v[x] > 種類:クラス[x] > ライブラリ:rexml/document[x]

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. l

検索結果

REXML::Formatters::Transitive (15003.0)

XMLドキュメントをテキストの内容を変えずに 多少の整形を加えて出力するクラスです。

...XMLドキュメントをテキストの内容を変えずに
多少の整形を加えて出力するクラスです。

これが有用な場合はあまりないでしょう。
整形されていない XML を整形したいが、
テキストの空白は改行は変えたくない場合には役...
...

//emlist[][ruby]{
r
equire 'rexml/document'
r
equire '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...