Improved XML import/export