use XML::Writer for tighter compliance with spec