xso: create library for streamed XML parsing

This library provides the traits to parse structs from XML and
serialise them into XML without having to buffer the document object
model in memory.

The only implementations it provides are for minidom, basically
providing a lower-level interface to `minidom::Element::from_reader` and
`minidom::Element::to_writer`.

This is the first stepping stone into a world where `xmpp_parsers` can
parse the structs directly from XML.
This commit is contained in:
Jonas Schäfer 2024-06-16 10:14:13 +02:00
commit 14a1d66bf8
6 changed files with 497 additions and 0 deletions

14
xso/Cargo.toml Normal file
View file

@ -0,0 +1,14 @@
[package]
name = "xso"
version = "0.0.2"
edition = "2021"
description = "XML Streamed Objects: similar to serde, but XML-native."
homepage = "https://xmpp.rs"
repository = "https://gitlab.com/xmpp-rs/xmpp-rs"
keywords = ["xmpp", "xml", "serialization"]
categories = ["encoding"]
license = "MPL-2.0"
[dependencies]
rxml = { version = "0.11.0", default-features = false }
minidom = { version = "^0.15" }