Class: XMLToRuby
- Inherits:
-
Object
- Object
- XMLToRuby
- Includes:
- Mongo
- 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 Mongo
Mongo::ASCENDING, Mongo::DESCENDING, Mongo::OP_DELETE, Mongo::OP_GET_MORE, Mongo::OP_INSERT, Mongo::OP_KILL_CURSORS, Mongo::OP_MSG, Mongo::OP_QUERY, Mongo::OP_REPLY, Mongo::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 |