<p>In app/views/changeset/_changeset.xml.builder:</p>
<pre style='color:#555'>> @@ -0,0 +1,26 @@
> +changeset_attributes = { :id => changeset.id, :created_at => changeset.created_at.xmlschema, :closed_at => changeset.closed_at, :open => changeset.is_open? }
> +changeset_attributes[:uid] = changeset.user.id if changeset.user.data_public?
> +changeset_attributes[:user] = changeset.user.display_name if changeset.user.data_public?
> +changeset.bbox.to_unscaled.add_bounds_to(changeset_attributes, '_') if changeset.bbox.complete?
> +
> +xml.changeset(changeset_attributes) do |asterx|
> +  changeset.tags.each do |k,v|
> +    xml.tag :k => k, :v => v
> +  end
> +  if @comments
> +    xml.discussion do 
</pre>
<p>What is the better solution, to use XML from <code>:read</code> everywhere or to implement comments in <code>to_xml</code>?</p>

<p>I've taken it from notes and it probably wasn't the best idea. I will review the comments XML output.</p>

<p>Content-type and document type (like <code><?xml version="1.0" encoding="UTF-8"?></code>) is added automatically when using <code>render</code> with XML template.</p>

<p>Outdating by subsequent changes was the rationale for delaying comments.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/openstreetmap/openstreetmap-website/pull/772/files#r15987139">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/1419053__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyMzExNDIzNCwiZGF0YSI6eyJpZCI6MzU4NjU3NjJ9fQ==--a69ab75654af221dc0650df09697ca263b1d8879.gif" width="1" /></p>