f34nk
Html tools in Elixir
The landscape of available Elixir packages for html tooling is overseeable but in that sense also very focused. Each library is there for a distinct use case.
For that reason I compiled a quick overview of the available html tools in Elixir.
Right now I only covered: Floki, HtmlSanitizeEx, Meeseeks, Myhtmlex, ModestEx
In my humble conclusion, I state that benchmarking is not very useful since the goal and main strength of each library is different. Also the tested methods are not really comparable, since the implemented overhead is very different between each library. It is safe to say that all libraries perform very very fast.
All in all, I would say, the focused nature of the tools makes it easy for the user to pick the right tool for the job.
However, the ecosystem of tools is still quite young. There is room for improvement.
Please feel invited to discuss missing features or differences to other libraries in other languages.
Best, f34nk
Most Liked
f34nk
Good point. I will add a column to the table.
Also true. I forgot. It is a feature that is easy to oversee however. I will also add this info to the table. Is Floki.map/2 only limited to changing attributes?
Yes I also agree here. But how would you like to see this information represented?
Really? That seems odd. Xml and html are completely different languages. Maybe they use the default parser and hope for the best.
Also popular resources like awesome-elixir only have a section for “XML” but not explicitly “HTML”. I think this is misleading!
I opened up an issue on awesome-elixir to add a new section “HTML”. ![]()
f34nk
I repeated the benchmarks and my benchee and benchfella results are different.
My benchfella shows the same result like you described. But the benchee measurements are somehow different.
I removed the benchee graphs from the repo and did some updates in the README. I hope this is better now.
Thanks for the feedback!
mischov
I’m pretty hesitant to at the moment- adding nodes in the right place as per the HTML5 spec, etc, is a pretty complicated topic, as is figuring out efficient ways to update what I currently treat as an immutable structure (the Document).
Meeseeks has from the first been designed as a tool to search for and extract data from HTML (and now XML), which is the purpose I use it for, and for the foreseeable future I plan to limit it to that.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









