XMarshal

XMarshal means 'XML Marshal'. Objects can be stored as and restored from well-formed XML document.

Advantage over standard Marshal:

Usage

require 'xmarshal'

For Japanese Users

XMarshal default encoding is UTF8 because of performance issue. If 'Uconv' is defined, XMarshal automatically configures itself to handle Japanese encoding. Input can be EUC, SJIS or ISO-2022-JP and output encoding is determined by $KCODE. So if Japanese processing needed, require as follows:

require 'uconv'
require 'xmarshal'

class XMarshal

Class Methods

dump(obj [,port])

Dump obj to port. Returns the resulting string if port is omitted.

load(port)

Load object from port.

Limitation

Author

Masaki Fukushima <fukusima@goto.info.waseda.ac.jp>