Extacted into XML Marshal to stop entity issues