15 releases (8 breaking)

0.10.3 Apr 14, 2021
0.10.2 Nov 13, 2020
0.10.1 Jul 7, 2020
0.10.0 Jan 5, 2020
0.2.1 Aug 19, 2015

#158 in Parser implementations

Download history 34968/week @ 2023-11-25 33368/week @ 2023-12-02 32267/week @ 2023-12-09 33248/week @ 2023-12-16 24274/week @ 2023-12-23 33794/week @ 2023-12-30 39046/week @ 2024-01-06 39973/week @ 2024-01-13 39367/week @ 2024-01-20 42873/week @ 2024-01-27 35798/week @ 2024-02-03 32194/week @ 2024-02-10 39409/week @ 2024-02-17 36909/week @ 2024-02-24 45825/week @ 2024-03-02 15777/week @ 2024-03-09

142,931 downloads per month
Used in 208 crates (60 directly)

MIT license

20KB
368 lines

xmltree-rs

Documention

A small library for parsing an XML file into an in-memory tree structure.

Not recommended for large XML files, as it will load the entire file into memory.

https://crates.io/crates/xmltree

Usage

Add the following to your Cargo.toml file:

[dependencies]
xmltree = "0.10"

Feature-flags

  • attribute-order - change the data structure that stores attributes into one that keeps a consistent order. This changes the type definition and adds another dependency.

Compatability with xml-rs

This crate will export some types from the xml-rs crate. If your own crate also uses the xml-rs crate, but with a different version, the types may be incompatible. One way to solve this is to only use the exported types, but sometimes that is not always possible. In those cases you should use a version of xmltree that matches the version of xml-rs you are using:

xml-rs version xmltree version
0.8 0.10
0.7 0.8
0.6 0.6

Example

See the documentation for some examples:

https://docs.rs/xmltree/

Dependencies

~240–430KB