Glad you found your answer - but I thought I'd mention that XML::DOM is not a great tool for dealing with very large XML files.
) which means they doesn't build a tree structure in memory. Depending on your task this can mean your app runs faster and uses far less memory. Used correctly an XML::SAX handler should be able to process arbitrarily large XML files.