Settings

Theme

Memory-efficient XML parser that yields Ruby objects

github.com

4 points by szajbus 13 years ago · 2 comments

Reader

mlitwiniuk 13 years ago

Nice one. But in few words - what makes it better than Nokogiri::XML::SAX::Document from which you inherit?

  • szajbusOP 13 years ago

    I wouldn't say it's better. saxy wraps around Nokogiri SAX Parser by implementing it's callbacks.

    What I wanted to achieve is to take advantage of SAX parser (memory efficiency when used correctly) with as little preconfiguration as possible, because I often face one-off tasks that involve importing large XML files into database.

    I've seen some implementations of SAX parsers, but they either missed the point by only using it's API under the hood and still returning all the results at once (thus not being memory-efficient at all) or required extensive configuration (which seems a waste for one-off imports).

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection