#751 ✓resolved
Alex Arnell

inconsistent to_xml in 0.9.9

Reported by Alex Arnell | January 7th, 2009 @ 02:12 PM

I applaud the new additions to dm-serializer with LibXML and Nokogiri, however there are some inconsistencies.

  • REXML
    • Does not render XML version string
  • LibXML
    • Renders XML version string
  • Nokogiri
    • Renders XML version string

I believe the XML version string printing was brought up before and there were reasons for leaving it out, but I cannot find those threads that discussed it.

Personally, I feel that to_xml should not be responsible for sending out the version declaration string. By automatically setting the declaration string it makes it impossible to nest or create your own to_xml collection loops.

The REXML way of doing could be leveraged in Merb, by use of the layouts with the display method.

Check out the Notes at the bottom of the display docs:

http://merbivore.com/documentati...


display @object, :layout => "zoo"

The transformed object will not be used in a layout unless a :layout is explicitly passed in the opts.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Referenced by

Pages