Converting the XML templating to now use XML::Writer