Better XML import and export function for issue 10