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
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. ![]()
marcuslankenau
Wow, I saw this too late. Started something similar a couple of days ago (https://github.com/mlankenau/elixml). 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.







