marcuslankenau
Elixml - XML library
I feel kind of stuck with the absence of a proper xml library for Elixir. Currently I use SweetXML which was ok for me more or less to parse the xml content that I receive. But it doen’t feel natural to use.
Now I have to generate xml content as well. I have use cases like cutting nodes (with xpath) from one document, enriching that part with other data and generating a new document. I don’t feel like I can do that easily with SweetXML or floki (that I really like).
I put something together that almost covers what I need, have to continue on it. Maybe someone is interested in the project as well:
Marcus
Most Liked
OvermindDL1
I use Meeseeks for both HTML and XML parsing, it’s awesome for both. The CSS and XPath selectors are supported on both HTML and XML parsing in it.
It does require having Rust’s compiler toolchain installed though.
OvermindDL1
marcuslankenau
We have a couple of datasource (SOAP/XML, FTP/XML). We transform this data to json that we use internally. Normally we transform one XML to one JSON document. But there are exceptions where we need to combine different XMLs to reuse our existing mappings. I am not keen to use XML but i have to.
marcuslankenau
I agree. The documentation is very basic and only showing some use cases with examples.
For your specific question:
You could parse the XML and manipulate the maps/array structure and store it as XML again. Not very convenient. Or we could think about having a map that works like the find and change nodes.
Why not open an issue with your feature request in the Github project and I will take care. Or you can contribute to the project if you like.
dimitarvp
Well, problem is, I have a work assignment and I am not looking at it through the eyes of an OSS contributor. I am looking for a ready-made solution.
I can file an issue alright, but offering a PR is highly unlikely at this point.







