Don't use XML for this. Instead, use MySQL's native support for dumping tab-separated files with 'SELECT INTO OUTFILE'. Then use
Text::CSV_XS to read the data a line at a time. The file will be much, much smaller and I'm just about certain the parsing will be faster. It might be interesting to do it both ways and benchmark the results, if you've got the time.
But if I was going to use XML for this I'd use XML::SAX with the XML::SAX::ExpatXS parser. It's a stream-parser so it won't try to load your whole file into memory at once.
-sam