Is it possible that the xml also is available to edit the same way as html where the content appears with visual preview toolbar and on click of edit the dcr opens.
Possibly generate html first and then convert to xml.try it out.