rjsteen

rjsteen

XML Parsing, Building, and Validating

I have been looking at the available Elixir/Erlang libraries for working with XML and cannot seem to find something that can do everything Nokogiri (Ruby) does.

I have come down to sweet_xml for parsing xml and erlsom for validating xml. I could use xml_builder to build xml or even erlsom. I have not found a library other than erlsom that does all three- parsing, building and validating. I am also an Elixir newbie so I could be missing something.

What would you all suggest? Using a combination of libraries as mentioned above or is there something else out there I’m missing?

Most Liked

kamidev

kamidev

Yes, Meeseeks is very nice! I recently used it for a small scraper and it was faster and easier to use than anything else I looked at.

Note that it’s fast because it uses a NIF to wrap the Rust library html5ever. I installed Rust (using asdf), added Meeseeks to my deps and it just worked. But it’s good to be aware of the extra dependency.

OvermindDL1

OvermindDL1

If you don’t need validation and the XML can all fit in memory then the Meeseeks library has a FANSTATIC query interface into XML that puts anything else I’ve used yet to shame. :slight_smile:

chulkilee

chulkilee

Check out GitHub - chulkilee/ex_scems: A Sentinel Cloud EMS Web Services wrapper in Elixir · GitHub.

Basically I use SweetXml.transform_by/2 and then pass map into struct!/2.

I wrote it a while ago, so I may want to do it different way now though :slight_smile:

Where Next?

Popular in Questions Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 48342 226
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31265 143
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36352 110
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127089 1222
New

We're in Beta

About us Mission Statement