Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parse, change and write back HTML in Elixir

I need a library to parse HTML, change some attributes of some elements, then write back result into HTML.

Is there a library for it?

In other languages (like PHP), there are DOM parsers. I found libraries for parsing HTML, but none of them allowed manipulation and generation (or I did not see it?).

like image 327
vfsoraki Avatar asked Oct 22 '25 03:10

vfsoraki


1 Answers

Have you seen Floki?

Floki is a simple HTML parser that enables search for nodes using CSS selectors.

Its parsing capabilities seem decent but not sure about manipulation. It has a transform method but there are no usage examples.

like image 151
Zubin Avatar answered Oct 23 '25 22:10

Zubin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!