XML Parsing with Ruby

In one of the projects(ACES), we came across a functionality: to parse huge(50mb+) XML files. Here efficiency was very critical piece, as file size was huge. Also we wanted the results of parsing quickly for further analysis so the effective time was less and application performance was unhampered. We chose SAX Parsing Technique(DOM vs SAX) There are two ways to parse an xml file, DOM and SAX. SAX being more efficient as it process the xml file incrementally, thereby memory utilization is minimum. Whereas a DOM parser, builds a tree representation of the entire document in memory