Is there a detailed description on the `.qgs` file structure somewhere? 

I checked at <http://mrcc.com/qgis.dtd> and got

> 
> The requested URL /qgis.dtd was not found on this server.
> 
> 
> 

and at <https://svn.osgeo.org/qgis/trunk/qgis/qgis.dtd> which wasn't very detailed.