nokolexbor
High-performance HTML5 parser for Ruby based on Lexbor, with support for both CSS selectors and XPath. (by serpapi)
Oga
Oga is an XML/HTML parser written in Ruby. (by yorickpeterse)
Our great sponsors
nokolexbor | Oga | |
---|---|---|
4 | 1 | |
154 | 1,162 | |
2.6% | - | |
5.5 | 4.0 | |
3 days ago | 11 months ago | |
Ruby | Ruby | |
- | Mozilla Public License 2.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
nokolexbor
Posts with mentions or reviews of nokolexbor.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-12-18.
-
Ruby 3.3's YJIT: Faster While Using Less Memory
Yes, we ended up replacing Nokogiri by Nokolexbor, our own port of lexbor parser with like almost full compatibility with Nokogiri APIs while being around 5x faster: https://github.com/serpapi/nokolexbor
- Nokolexbor: A drop-in replacement for Nokogiri Up to 5.2x faster at parsing HTML
-
Created a performance-focused HTML5 parser for Ruby, trying to be API-compatible with Nokogiri
Github: https://github.com/serpapi/nokolexbor
- Show HN: High performance HTML5 parser for Ruby, a Nokogiri alternative
Oga
Posts with mentions or reviews of Oga.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-12-26.
-
How to write a compiler or interpreter in rust
In terms of parsing style I suggest sticking with a hand-written recursive-descent parser. Parser generators seem appealing at first, but I always ran into annoying limitations when using them (I wrote one in Ruby myself as well, and used this for this project). Parsing combinators are useful for small inputs, but I find them difficult to use for anything but simple cases.
What are some alternatives?
When comparing nokolexbor and Oga you can also consider the following projects:
Nokogiri - Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.
Tomlrb - A Racc based TOML parser
Ox - Ruby Optimized XML Parser
HTML::Pipeline - HTML processing filters and utilities
raabro - a Ruby PEG parser library
ROXML - ROXML is a module for binding Ruby classes to XML. It supports custom mapping and bidirectional marshalling between Ruby and XML using annotation-style class methods, via Nokogiri or LibXML.
HappyMapper - Object to XML mapping library, using Nokogiri (Fork from John Nunemaker's Happymapper)
Sablon - Ruby Document Template Processor based on docx templates and Mail Merge fields.