Download Latest Version v0.40.1 - Fix rarely possible serde deserialization panic source code.tar.gz (1.5 MB)
Email in envelope

Get an email when there's a new version of quick-xml

Home / v0.40.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-05-11 2.3 kB
v0.40.0 - UTF-16 and ISO-2022-JP encodings supported source code.tar.gz 2026-05-11 1.5 MB
v0.40.0 - UTF-16 and ISO-2022-JP encodings supported source code.zip 2026-05-11 1.6 MB
Totals: 3 Items   3.1 MB 0

What's Changed

MSRV bumped to 1.79.

Now quick-xml supports the UTF-16 and ISO-2022-JP encoded documents. See the new DecodingReader type.

New Features

  • #956: Add DecodingReader, a BufRead adapter that auto-detects encoding from BOM or XML declaration and transcodes to UTF-8. Enabled by the encoding feature.
  • #938: Add new enumeration XmlVersion and typified getter BytesDecl::xml_version().
  • #938: Add new error variant IllFormedError::UnknownVersion.
  • #371: Add new error variant EscapeError::TooManyNestedEntities.
  • #371: Improved compliance with the XML attribute value normalization process by adding
  • Attribute::normalized_value()
  • Attribute::normalized_value_with()
  • Attribute::decoded_and_normalized_value()
  • Attribute::decoded_and_normalized_value_with()

which ought to be used in place of deprecated

  • Attribute::unescape_value()
  • Attribute::unescape_value_with()
  • Attribute::decode_and_unescape_value()
  • Attribute::decode_and_unescape_value_with()

Deprecated functions now behaves the same as newly added.

Bug Fixes

  • #938: Use correct rules for EOL normalization in Deserializer when parse XML 1.0 documents. Previously XML 1.1. rules was applied.

Misc Changes

  • #914: Remove deprecated .prefixes(), .resolve(), .resolve_attribute(), and .resolve_element() of NsReader. Use .resolver().<...> methods instead.
  • #938: Now BytesText::xml_content, BytesCData::xml_content and BytesRef::xml_content accepts XmlVersion parameter to apply correct EOL normalization rules.
  • #944: read_text() now returns BytesText which allows you to get the content with properly normalized EOLs. To get the previous behavior use .read_text().decode()?.
  • #956: Bumped MSRV from 1.59 (Feb 2022) to 1.79 (June 2024)

New Contributors

Full Changelog: https://github.com/tafia/quick-xml/compare/v0.39.4...v0.40.0

Source: README.md, updated 2026-05-11