ChangeLog

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