How can I preserve comments when saving an XML file via the XML library?

I am using Robot Framework’s XML library to modify a configuration XML file for a Windows application I am testing.

Using the Save Xml keyword strips off comments when it saves the file (as noted in the documentation).

I would like to preserve the comments when saving the file–is there a way to do this using standard or external libraries?