0

I would like to parse large (2.2 GB) XML data files with Nokogiri.

If I do normal DOM parsing, surely the system will crash.

Is there best strategy for large XML files parsing with Nokogiri?

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Raju akula
  • 1,255
  • 1
  • 13
  • 18
  • 2
    Use Nokogiri's [SAX parser](http://www.rubydoc.info/github/sparklemotion/nokogiri/Nokogiri/XML/SAX). SAX parsers can read arbitrarily large documents. – the Tin Man Jan 20 '15 at 00:31
  • @theTinMan, I am going with nokogiri reader parser which will parse very large XML documents quickly without the need to load the entire document into memory or write a SAX document parser. – Raju akula Jan 20 '15 at 09:26

0 Answers0