
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
-
Dan Kubb (dkubb) January 8th, 2009 @ 04:26 AM
- Assigned user set to Xavier Shay
-
Xavier Shay January 8th, 2009 @ 11:08 AM
- State changed from unconfirmed to accepted
I agree with you, I will fix
-
Xavier Shay January 10th, 2009 @ 09:08 PM
- State changed from accepted to resolved
http://github.com/sam/dm-more/co...
Fixed, although there has to be a nicer way...
(OT: github lighthouse integration didn't work sad face)
-
Dan Kubb (dkubb) January 11th, 2009 @ 12:15 PM
(from [e1cb5a2b8128ddc0b1fb01fcf223a9f8c020bd93]) [dm-serializer] Don't emit XML prologue when using libxml or nokogiri. There's probably a much nicer way of doing this but I couldn't find it :(
[#751 state:resolved] http://github.com/dkubb/dm-more/...
-
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.
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
Tags
Referenced by
-
751 inconsistent to_xml in 0.9.9 [#751 state:resolved] http://github.com/dkubb/dm-more/...