Implemetented XML writer!