When I initially wrote the Serializer I was just using write!() to write the XML as a string to an internal io::Writer.
Ideally we should be using the xml-rs library instead so can guarantee the generated XML is syntactically correct, plus we'd get things like pretty-printing for free.