Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eminence/xmltree-rs
Reads an XML file into a simple tree structure
https://github.com/eminence/xmltree-rs
rust xml xml-parser
Last synced: 14 days ago
JSON representation
Reads an XML file into a simple tree structure
- Host: GitHub
- URL: https://github.com/eminence/xmltree-rs
- Owner: eminence
- License: mit
- Created: 2015-08-15T18:02:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-09-06T15:28:08.000Z (about 1 year ago)
- Last Synced: 2024-05-02T12:39:42.721Z (7 months ago)
- Topics: rust, xml, xml-parser
- Language: Rust
- Size: 1.05 MB
- Stars: 38
- Watchers: 5
- Forks: 29
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
xmltree-rs
==========[Documentation](https://docs.rs/xmltree/)
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:
```toml
[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/