# File lib/dm-serializer/to_xml.rb, line 67 def to_xml(opts = {}) to_xml_document(opts).to_s end
# File lib/dm-serializer/to_xml.rb, line 71 def to_xml_document(opts = {}) xml = DataMapper::Serializer::XML.serializer doc = xml.new_document root = xml.root_node(doc, "errors", {'type' => 'hash'}) errors.each do |key, value| property = xml.add_node(root, key.to_s, nil, {'type' => 'array'}) property.attributes["type"] = 'array' value.each do |error| xml.add_node(property, "error", error) end end doc end
Generated with the Darkfish Rdoc Generator 2.