move xml printing details to xml_printer