XMLTV file format
Each file first has zero or more elements which don't do a lot, mostly just giving human-readable names to channel identifiers. Then there are some elements.
A simple example might look like:
<tv generator-info-name="tv_grab_uk">
<channel id="bbc2.bbc.co.uk">
<display-name lang="en">BBC2</display-name>
</channel>
<channel id="channel4.com">
<display-name lang="en">Channel 4</display-name>
</channel>
<programme channel="bbc2.bbc.co.uk" start="20010829000500 +0100">
<title lang="en">The Phil Silvers Show</title>
<desc lang="en">
Bilko claims he's had a close encounter with an alien in order
to be given some compassionate leave so he can visit an old
flame in New York.
</desc>
</programme>
<programme channel="channel4.com" start="20010829095500 +0100">
<title lang="en">King of the Hill</title>
<sub-title lang="en">Meet the Propaniacs</sub-title>
<desc lang="en">
Bobby tours with a comedy troupe who specialize in
propane-related mirth.
</desc>
<credits>
<actor>Mike Judge</actor>
<actor>Lane Smith</actor>
</credits>
<category lang="en">animation</category>
</programme>
</tv>
It is possible to get more complex than this, giving information on picture and sound, subtitles, age ratings and more. But almost every feature is optional so you can start with something simple. For more details, see the XMLTV DTD. If you like, you can make a printable version using dtd2latex.
There are also more requirements imposed on the fileformat if a grabber wants to be baseline compliant. See XmltvCapabilities.
A big reason to publish the file format as a DTD is that you can ValidateXml.
New File Format
The work with the new fileformat has stalled. The current xmltv dtd seems to be good enough for almost all purposes.
The next 'major' development release of xmltv, 0.6, will use a different file format. It will still be XML based and have much of the flavour of the current format, but will store more information and handle some things like 'clumps' and repeated programmes more cleanly. This will not be a backwards compatible change, in that most older-format files will not be valid according to the new DTD. However it is planned to provide converters in both directions.
You can view the [current working version of the new DTD] (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/checkout/xmltv/xmltv/todo/xmltv-0.6.dtd?rev=HEAD&content-type=text/plain") in CVS. Discussion of the new format is happening on the xmltv-devel mailing list.
Jeff Dairiki has written an early version of an old to new format converter using XSLT.