exportToXML uses repo instead of db