to_xml(options = {}, &block)
Instance Public methods
Returns XML representing the model. Configuration can be passed through
options.
Without any options, the returned XML string will include all
the model's attributes.
user = User.find(1)
user.to_xml
<?xml version="1.0" encoding="UTF-8"?>
<user>
<id type="integer">1</id>
<name>David</name>
<age type="integer">16</age>
<created-at type="dateTime">2011-01-30T22:29:23