16 releases (9 breaking)

0.11.0 Aug 25, 2024
0.10.3 Apr 14, 2021
0.10.2 Nov 13, 2020
0.10.1 Jul 7, 2020
0.2.1 Aug 19, 2015

#47 in Parser implementations

Download history 78535/week @ 2024-08-22 83105/week @ 2024-08-29 91026/week @ 2024-09-05 81381/week @ 2024-09-12 81948/week @ 2024-09-19 79760/week @ 2024-09-26 87023/week @ 2024-10-03 84790/week @ 2024-10-10 86975/week @ 2024-10-17 87766/week @ 2024-10-24 78920/week @ 2024-10-31 84259/week @ 2024-11-07 85958/week @ 2024-11-14 89500/week @ 2024-11-21 93231/week @ 2024-11-28 79063/week @ 2024-12-05

362,437 downloads per month
Used in 389 crates (70 directly)

MIT license

23KB
405 lines

xmltree-rs

Documentation

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.11"

Feature-flags

  • attribute-order - change the data structure that stores attributes to one that uses insertion order. This changes the type definition and adds another dependency.

  • attribute-sorted - change the data structure that stores attributes to one that uses sorted order. This changes the type definition.

Compatibility 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.11
0.7 0.8
0.6 0.6

Example

See the documentation for some examples:

https://docs.rs/xmltree/

Dependencies

~245–415KB