Overbryd

Overbryd

Exoml - parse xml strings into a tree

A module to decode/encode xml into a tree structure.

The aim of this parser is to be able to represent any xml document as a tree-like structure, but be able to put it back together in a sane way.

In comparison to other xml parsers, this one preserves broken stuff. The goal is to be able to decode the typical broken html document, modify it, and encode it again, without loosing too much of its original content.

Currently the parser preserves whitespace between <xml> nodes, so <pre> or <textarea> tags should be unaffected, by a decode/1 into encode/1.

The only part where the parser tidies up, is the attr=“part” of a <xml attr=”part”> node.

With well-formed XML, the parser does work really well.

Most Liked

OvermindDL1

OvermindDL1

I would certainly hope it would be. ^.^
It’s not doing parsing, validation, nothing of the sort, so you just kind of have to hope the file is proper for the structure you expect without changing, but at that point it’s not treated as XML anyway. :slight_smile:

marcuslankenau

marcuslankenau

Wow, I saw this too late. Started something similar a couple of days ago (GitHub - mlankenau/elixml: Easy to use xml manipulation in Elixir · GitHub). But I am not aiming for html parsing. It is pure XML with XMLNS but other than that there are a lot of things in common. What I needed was the ability to construct and save xml (that you are supporting as well) and searching with an xpath-subset.

I was missing these feature complete xml libs that we have in the ruby world. Thats the long term goal.

Last Post!

Overbryd

Overbryd

That seems like a nice feature to add to exoml. I have added an issue to track progress: indent output on encode · Issue #3 · Overbryd/exoml · GitHub

Where Next?

Popular in Announcing Top

wfgilman
I’ve cleaned up and open sourced three financial libraries I was using for my company. They are bindings for the APIs of these three comp...
New
mspanc
I am pleased to announce an initial release of the Membrane Framework - an Elixir-based framework with special focus on processing multim...
New
josevalim
EDIT: since Ecto 3.0 final version is out, this post was amended to use the final versions in the instructions below. Hi everyone, We a...
New
maltoe
Hello! Came here to announce ChromicPDF, a pet project PDF generator I’ve been working on for the past few months. Why another PDF gener...
New
tmbb
PhoenixWS - Websockets over Phoenix Channels Source code on Github here: GitHub - tmbb/phoenix_ws: Websockets implemented over Phoenix Ch...
New
zachdaniel
Ash Framework What is Ash? Ash Framework is a declarative, resource-oriented application development framework for Elixir. A resource can...
New
Flo0807
Hello everyone! I am excited to share our heart project Backpex with you. After building several Phoenix applications, we realized that...
New

Other popular topics Top

hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" =&gt; #BSON.ObjectId&lt;58eb1a7a9ad169198c3dXXXX&gt;, "email" =&gt; ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
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
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 49134 226
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44608 311
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement