Given that XML has the ability to source in other files, why on earth do you have a 2G XML file?! Personally, I'd pre-process the file and chunk it out so that you have the ability to work with it. Either than or pre-process it into something a little more amenable to easy use, like a nice binary file.
A third option would be to have XML::Simple to work with a DBM::Deep-backed hash.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?