Add XML declaration automatically