ChangeLog

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