Solution: http://dave.burt.id.au/ruby/gedcom.rb
Sample input: http://dave.burt.id.au/ruby/royal.ged
Sample output: http://dave.burt.id.au/ruby/royal.xml

My solution doesn't build any trees, just an XML string, but it does do its 
best to represent IDs and x-refs and things like CONTs and CONCS, and even 
indents the XML nicely.

* @s are removed from all IDs
* CONTs and CONCs are aggregated into a single text node, semantically 
required whitespece preserved
* cross-references look like <xref>id</xref>