qcam

qcam

Saxy: A fast, easy-to-use and XML 1.0 compliant SAX parser in Elixir

Yo Elixir fellows!

I have just released Saxy – as the name might have already implied: It is a new XML SAX parser.

What is so great about Saxy?

TL;DR It is fast, easy to use, streamy and compliant to XML 1.0.

Saxy is quite fast. Benchmarking results show that it could parse up to 15.37 MB of binary per second. In comparison to other similar libraries, Saxy is usually 1.4 times faster than Erlsom and 4.46 times faster than xmerl. The speed is particularly noticeable with 4.35 times faster than Erlsom when parsing large and deeply nested XML.

Saxy is easy to use. It emits binary instead of characters list like xmerl and Erlsom, which makes it extremely easy to use. Like Erlsom, Saxy provides a function to export XML documents into “simple form” format.

Saxy supports streaming parsing in a native Elixir way. Saxy accepts passing File.Stream and Stream as the input, which means you are in full control of how the file/binary chunks will be streamed.

Saxy is XML 1.0 compliant. However, no Doctype Definition and external entities are supported at the moment.

I also published a blog post about how the library was built.

Feedbacks, suggestions, PRs are welcome :bowing_man:! Thank you!

References:

  1. Benchmark suite
  2. XML 1.0
  3. Erlsom

Where Next?

Popular in Libraries Top

woylie
I released Doggo, a collection of unstyled Phoenix components. Features Unstyled Phoenix components. Storybook that can be added to...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
praveenperera
FastRSS Parse RSS feeds very quickly: This is rust NIF built using rustler Uses the RSS rust crate to do the actual RSS parsing Speed...
New
danschultzer
In short Plug n’ play OAuth 2.0 provider library. Just set up a resource owner schema with Ecto (your user schema), install the dependen...
New
asiniy
Hey there! I wrote a download elixir package which does exactly what its name about - an easy way to download files. I saw solutions ...
New
Qqwy
Hello everyone, I wrote a small library today called MapDiff. It returns a map listing the (smallest amount of) changes to get from map...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
engineeringdept
I’ve just released the first version of Snap, an Elasticsearch client. It borrows ideas about application structure and process managemen...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
mattludwigs
Grizzly is a library for working with Z-Wave devices. Z-Wave is a low-frequency radio protocol for controlling smart home devices on a me...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New

Sub Categories:

We're in Beta

About us Mission Statement