EPGExport is a plugin for Enigma2 based devices will allow the export of the EPG system to an XMLTV file.
This code was originally developed by Gutemine. I cannot seem to find the source anywhere except in a package manager here. This code is based off of version 1 RC3.
An early version can be found here, with more details, but the above URL appears to be a later version of the plugin.
Download the IPK to a folder on your Enigma2 box, and then go the "System > Software Management > Install Local Extension". Find the IPK downloaded to the box, and install. Once installed, reboot the GUI for the box.
Go to "Plugins > EPGExport" and configure. Then select "Downloading" and this will produce your XMLTV file
Gutemine - https://sourceforge.net/u/gutemine/profile
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.