Class: XMLToRuby
- Inherits:
-
Object
- Object
- XMLToRuby
- Includes:
- XGen::Mongo::Driver
- Defined in:
- lib/mongo/util/xml_to_ruby.rb
Overview
Converts a .xson file (an XML file that describes a Mongo-type document) to an OrderedHash.
Constant Summary
Constants included from XGen::Mongo::Driver
XGen::Mongo::Driver::OP_DELETE, XGen::Mongo::Driver::OP_GET_MORE, XGen::Mongo::Driver::OP_INSERT, XGen::Mongo::Driver::OP_KILL_CURSORS, XGen::Mongo::Driver::OP_MSG, XGen::Mongo::Driver::OP_QUERY, XGen::Mongo::Driver::OP_REPLY, XGen::Mongo::Driver::OP_UPDATE
Instance Method Summary collapse
Instance Method Details
#xml_to_ruby(io) ⇒ Object
26 27 28 29 |
# File 'lib/mongo/util/xml_to_ruby.rb', line 26 def xml_to_ruby(io) doc = REXML::Document.new(io) doc_to_ruby(doc.root.elements['doc']) end |