It wouldn't hurt to look at Boulder and AcePerl. These are Lincoln Stein's contributions to Genomics in Perl and I do know that Boulder supports XML output of its data. Whether it does so without memory constraints, I can't say.
Comment on Re: how to write a huge XML file without encountering memory limits