るりまサーチ

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

別のキーワード

  1. stringio read
  2. stringio sysread
  3. stringio readpartial
  4. stringio set_encoding
  5. stringio each

種類

クラス

キーワード

検索結果

REXML::Formatters::Default (20.0)

XMLドキュメントを(文字列として)出力するクラスです。

...力します。

//emlist[][ruby]{
require 'rexml/document'
require 'rexml/formatters/default'
doc = REXML::Document.new <<EOS
<root>
<children>
<grandchildren/>
</children>
</root>
EOS

default_formatter = REXML::Formatters::Default.new
output = StringIO.new
default_formatter.write(doc, output)
o...
...>\n</children>\n</root>\n"

output = StringIO.new
default_formatter.write(REXML::XPath.first(doc, "/root/children"), output)
output.string
# => "<children>\n <grandchildren/>\n</children>"

ie_hack_formatter = REXML::Formatters::Default.new(true)
output = StringIO.new
ie_hack_formatter.write(doc, o...

REXML::Formatters::Transitive (14.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,...
...print output.string
# >> <root
# >> ><children
# >> >
# >> <grandchildren foo='bar'
# >> />
# >> </children
# >> ></root
# >> >

output = StringIO.new
transitive_formatter.write(REXML::XPath.first(doc, "/root/children"), output)
output.string
# => "<children\n>\n<grandchildren foo='bar'\n...

REXML::Document.parse_stream(source, listener) -> () (8.0)

XML文書を source から読み込み、パースした結果を listener にコールバックで伝えます。

...す。

コールバックの詳しい仕組みなどについては REXML::Parsers::StreamParser
および REXML::StreamListener を参照してください。

@param source 入力(文字列、IO、IO互換オブジェクト(StringIOなど))
@param listener コールバックオブジェクト...

REXML::Formatters::Pretty (8.0)

XMLドキュメントを(文字列として)見た目良く出力するクラスです。

...ます。

//emlist[][ruby]{
require 'rexml/document'
require 'rexml/formatters/pretty'
doc = REXML::Document.new <<EOS
<root>
<children>
<grandchildren foo='bar'/>
</children>
</root>
EOS

pretty_formatter = REXML::Formatters::Pretty.new
output = StringIO.new
pretty_formatter.write(doc, output)
o...

REXML::IOSource (8.0)

内部用なのでユーザは使わないでください。

...内部用なのでユーザは使わないでください。

IO、もしくは StringIO のような
IO likeなオブジェクトを wrap するクラス。...

絞り込み条件を変える