#xml #xpath #parser #html #libxml


A Rust wrapper for libxml2 - the XML C parser and toolkit developed for the Gnome project

41 releases

✓ Uses Rust 2018 edition

0.2.12 Jun 16, 2019
0.2.9 Mar 28, 2019
0.2.6 Dec 7, 2018
0.2.5 Sep 27, 2018
0.0.3 Feb 24, 2016

#30 in Parser implementations

Download history 47/week @ 2019-03-03 57/week @ 2019-03-10 53/week @ 2019-03-17 217/week @ 2019-03-24 46/week @ 2019-03-31 49/week @ 2019-04-07 60/week @ 2019-04-14 57/week @ 2019-04-21 53/week @ 2019-04-28 43/week @ 2019-05-05 63/week @ 2019-05-12 102/week @ 2019-05-19 160/week @ 2019-05-26 89/week @ 2019-06-02 82/week @ 2019-06-09

359 downloads per month
Used in 2 crates

MIT license

25K SLoC

Build Status API Documentation License crates.io

Rust wrapper for libxml2.

The main goal of this project is to benefit from libxml2's maturity and stability while the native Rust XML crates mature to be near-drop-in replacements.

As of the 0.2.0 release of the crate, there are some modest safety guarantees:

  • Mutability, as well as ownership - we use Rc<RefCell<T>> wrappers to ensure runtime safety of libxml2 operations already in the Rust layer.
  • Memory safety guarantees - in particular Node and Document objects have automatic bookkeeping and deallocation on drop, for leak-free wrapper use.
  • No thread safety - libxml2's global memory management is a challenge to adapt in a thread-safe way with minimal intervention

Coverage: Only covers a subset of libxml2 at the moment, contributions are welcome. We try to increase support with each release.

Welcome! With these caveats, the contributors to the project are migrating production work towards Rust and find a continuing reliance on libxml2 a helpful relief for initial ports. As such, contributions to this crate are welcome, if your workflow is not yet fully supported.