Adding function to extract XML from IMD files.