XML Parser for Ruby
Asked Answered
S

3

6

Looking for something similar to xerces for parsing an xml file in ruby. I saw the native processor REXML and another called hpricot (though I can't find any documentation on hpricot, the links all appear to be dead). I'm looking for something that would parse an xml document via SAX2 in ruby.

TIA.

Sedillo answered 2/9, 2009 at 18:18 Comment(1)
Most of the hpricot links are broken because _why was the developer, and he managed to almost completely remove himself from the internet a few weeks ago. GitHub has a mirror up now (github.com/whymirror/hpricot/tree/master)Franek
W
9

I've been successful with the Nokogiri SAX Parser

Waftage answered 2/9, 2009 at 18:21 Comment(1)
Nokogiri really is the best thing out there. It's nice and clean, without too much magic.Distil
B
1

Apart from those already mentioned, the other mainstream alternative is probably LibXML

Buxton answered 2/9, 2009 at 19:20 Comment(0)
H
0

There are two fast BLAST XML parsers for Ruby, which are easy to understand examples of iterative lazy parsing, using a C extension for the low-level XML parsing. Both are based on libxml2 and Nokogiri. Nokogiri because the performance rocks. See http://biogems.info to find the two parsers.

Hygienics answered 31/7, 2011 at 19:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.