ChangeLog

 1Version NEXT:
 2
 3Version 0.2.0, released 2025-09-17:
 40000-00-00 Jonas Schäfer <jonas@zombofant.net>
 5    * Breaking
 6      - The methods of `TextCodec<T>` now have `&self` receivers. This also
 7        implies that `#[xml(text(codec = ..))]` now takes expressions instead
 8        of type paths.
 9
10        Because all implementations provided by `xso` were in fact unit
11        structs, this should not change most invocations, with one exception:
12        The type argument of `Base64` was removed. Replace all `Base64<Foo>`
13        references with `Base64.filtered(Foo)` to update your code.
14
15        This change overall allows for more flexibility in the implementation
16        of text codecs.
17      - `xml:lang` attributes are now silently discarded during
18        deserialisation unless captured by `#[xml(attribute = "xml:lang")]` or
19        equivalent. This is because `xml:lang` is special as per
20        XML 1.0 § 2.12 and it is generally preferable to allow it to occur
21        anywhere in the document.
22      - The `FromXml::from_events` and `FromEventsBuilder::feed` functions
23        gained an additional argument to support `xml:lang` inheritance.
24    * Added
25      - Support for child elements in derive macros. Child elements may also
26        be wrapped in Option or Box or in containers like Vec or HashSet.
27      - Support for overriding the names of the types generated by the derive
28        macros.
29      - Support for deriving FromXml and AsXml on enums.
30      - Support for extracting data from child elements without intermediate
31        structs.
32      - Support for collecting all unknown children in a single field as
33        collection of `minidom::Element`, or one unknown child as a
34        `minidom::Element`, or zero or one unknown children as an
35        `Option<minidom::Element>`.
36      - Support for "transparent" structs (newtype-like patterns for XSO).
37      - FromXmlText and AsXmlText are now implemented for jid::NodePart,
38        jid::DomainPart, and jid::ResourcePart (!485)
39      - Support for optional child elements, the presence of which are
40        translated into a boolean (`#[xml(flag)]`).
41      - Generic TextCodec implementation for all base64 engines provided by
42        the base64 crate (if the `base64` feature is enabled).
43      - New `codec` field on `attribute` meta, to support decoding and
44        encoding using any `TextCodec`.
45      - Support for `no_std` usage (the alloc crate is required, though).
46      - Add a PrintRawXml helper struct to be able to display raw xml, useful
47        for debug logs.
48      - Support to selectively discard attributes or text content during
49        parsing (!552).
50      - Implement `AsXml` and `FromXml` for serde_json::Value` behind
51        `serde_json` feature.
52      - Support for a post-deserialization callback function call. (!553)
53      - Support for correctly inheriting `xml:lang` values throughout the
54        XML document.
55      - `xso::convert_via_fromstr_and_display`, a declarative macro to provide
56        `AsXmlText` and `FromXmlText` implementations based on the standard
57        library's `Display` and `FromStr` traits.
58      - `AsXmlDyn`, a dyn-compatible variant of `AsXml` (!573).
59      - `FromXml::xml_name_matcher()` and related types, which allow `FromXml`
60        implementors to provide cachable hints to callers about which XML
61        elements are valid candidates for parsing (!573).
62      - `Xso<dyn Trait>`, a Box-like struct which can hold a dynamically-typed
63        XSO, alongside related traits and (declarative) macros (!573).
64      - `XsoVec<dyn Trait>`, a container which can hold dynamically-typed
65        XSOs (!573).
66    * Changes
67      - Generated AsXml iterator and FromXml builder types are now
68        doc(hidden), to not clutter hand-written documentation with auto
69        generated garbage (something certain big tech companies could take
70        an example of, honestly).
71      - Fixed bug where putting an attribute field below any non-attribute
72        field in a struct definition would cause a compile-time error when
73        deriving `AsXml`.
74      - Update rxml dependency to 0.13.
75      - xso now rejects conflicting `#[xml(attribute)]` (and `#[xml(lang)]`)
76        specifications at compile time.
77      - Deprecate `try_from_element` in favour of `transform`.
78
79Version 0.1.2:
802024-07-26 Jonas Schäfer <jonas@zombofant.net>
81    * Added
82      - FromXmlText and AsXmlText are now implemented on char.
83    * Fixed
84      - Docs build on docs.rs now shows feature-gated items.
85
86Version 0.1.1:
872024-07-25 Maxime “pep” Buquet <pep@bouah.net>
88    * Added
89      - Import various text codecs from parsers: FixedHex, ColonSeparatedHex,
90        EmptyAsError.
91
92Version 0.1.0:
932024-07-25 Jonas Schäfer <jonas@zombofant.net>
94    * Initial release of this crate