Commit graph

28 commits

Author SHA1 Message Date
Emmanuel Gil Peyrot
1adccee40b minidom: Fix all clippy warnings 2024-07-03 16:28:11 +02:00
Jonas Schäfer
14a1d66bf8 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.
2024-06-18 16:54:11 +02:00
Jonas Schäfer
84de007640 Update rxml to 0.11.0 2024-06-15 12:58:39 +02:00
Jonas Schäfer
fb63ac8e50 Update rxml to 0.10.0
See release notes [1] for details.

   [1]: https://codeberg.org/jssfr/rxml/releases/tag/v0.10.0
2024-03-16 17:39:55 +01:00
Werner Kroneman
65c91439f8 Used Element::append_text instead of append_text_node in TreeBuilder::process_text to prevent weird splitting of text when there is no element in between. 2024-03-10 10:46:30 +00:00
Werner Kroneman
f54776ca0a Added Element::append_text 2024-03-10 10:46:30 +00:00
Jonas Schäfer
3b3a4ff0c8 Do not .clone() Element in code generated with generate_element
This should improve performance a little.
2024-03-03 15:05:11 +01:00
Emmanuel Gil Peyrot
1bab5c3cd9 Remove redundant imports
These became warnings in a recent nightly.

The TryFrom/TryInto imports were missed in
4089891f6c, but the rest are truly
redundant.
2024-02-27 22:57:18 +01:00
8f18cf2208
minidom: fix boolean test
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
Issue introduced in 60ebcb8c8a.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-12-16 00:20:03 +01:00
4089891f6c Update edition to 2021
- Remove TryFrom/Into and FromIterator imports
- Prevent impl_validator_using_provider macro in sasl crate from
  constructing trait object

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-12-15 19:40:09 +00:00
60ebcb8c8a
minidom: clippy pass
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-12-14 18:12:45 +01:00
Kristoffer Andersson
5a1ef42369 fix: make eq num nodes is unequal
fixes #99
2023-09-05 14:19:35 +02:00
Emmanuel Gil Peyrot
eb628704c0 minidom: Bump rxml
This was causing a memory corruption on closing tags for elements with a
name longer than 24 bytes.  I haven’t investigated why smartstring < 1
had this bug, but it got fixed in 1.0.0 so let’s use that.
2023-04-03 11:28:41 +02:00
eb3a62eb7e minidom: clear warning in failure_with_duplicate_namespace test
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-15 18:48:21 +01:00
8977745fe3
Fixes #44: Two prefixes resolving to the same namespace
The new TreeBuilder addition seems to have fixed this bug. I added the
test that was provided in !108 by Oliver Inemar but not the rest of the
code.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-14 22:32:00 +01:00
93174f97ec
minidom: Allow passing prefixes alongside a reader
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2023-01-09 13:40:18 +01:00
Michel Alexandre Salim
940f1bc295 Remove doc references to quick-xml, update CHANGELOG
`minidom` no longer uses it since !154. Also, CHANGELOG was not updated
for 0.15.0 and still referenced 0.14.0; take a stab at documenting what
has changed.

Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
2022-12-30 14:29:15 +00:00
Jonas Schäfer
ea366c2334 Rip out quick-xml 2022-04-24 13:27:48 +02:00
Astro
568a7c2611 minidom: remove unused parser module 2022-04-19 20:45:44 +02:00
Astro
d4a5a8247b minidom, tokio-xmpp: switch xml parsing to rxml 2022-04-19 20:42:30 +02:00
281f1bd195 minidom: un-ignore doctest in lib.rs
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-03-22 17:12:54 +01:00
Bastien Orivel
56363714fb Update quick-xml to 0.22 and bump version 2021-12-28 16:04:12 +00:00
Emmanuel Gil Peyrot
7ddf5e5c33 minidom: Replace IPv4 test with IPv6
This makes the tests pass again on nightly, and avoids using legacy IP
while we have glorious IPv6 support everywhere nowadays.

See also https://github.com/rust-lang/rust/issues/90199
2021-12-01 18:21:34 +01:00
16292e1e6f
minidom: specify again that we handle XMPP primarily
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2021-11-14 14:32:19 +01:00
Emmanuel Gil Peyrot
4e914e5d3a minidom: Fix some issues reported by clippy 2021-10-11 16:17:09 +02:00
Jasper Hugo
ebf1091cf1 Handle identical namespaces of sibling elements correctly
Fixes #48
2021-10-11 06:34:14 +00:00
Paul Fariello
204b1f38eb Fix Element::ns() doc 2021-10-06 18:47:46 +02:00
Emmanuel Gil Peyrot
714d850e69 Remove the -rs suffix of jid, minidom and xmpp
We know those are Rust libraries, no need to add it to the path.  This
synchronises their directory with the crate name, hopefully reducing
confusion.
2020-06-22 02:17:32 +02:00