Added XML import and export functions