Skip to content

Upgrading quick-xml 0.39 to 0.40

Breaking0.39.4 → 0.40.1Breaking3Platform2Deprecated1New5Fixed2

BreakingUpgrade verdict

3 breaking changes and a platform requirement change.

  • Removes the deprecated NsReader methods .prefixes(), .resolve(), .resolve_attribute() and .resolve_element(); use .resolver().<...> instead.
  • BytesText::xml_content, BytesCData::xml_content and BytesRef::xml_content now take an XmlVersion parameter to apply correct EOL normalization rules.
  • read_text() now returns BytesText with properly normalized EOLs; use .read_text().decode()? for the previous behavior.
  • You now need Rust 1.79 or newer to build this crate.
5 items need code or config changes

Rust requirement changed in 0.40.0: 1.56 → 1.79.

Breaking3
Removes the deprecated NsReader methods .prefixes(), .resolve(), .resolve_attribute() and .resolve_element(); use .resolver().<...> instead.
NsReaderNsReader::prefixes()NsReader::resolve()NsReader::resolve_attribute()NsReader::resolve_element()NsReader::resolver()
BytesText::xml_content, BytesCData::xml_content and BytesRef::xml_content now take an XmlVersion parameter to apply correct EOL normalization rules.
BytesText::xml_contentBytesCData::xml_contentBytesRef::xml_contentXmlVersion
read_text() now returns BytesText with properly normalized EOLs; use .read_text().decode()? for the previous behavior.
read_text()BytesTextdecode()
Platform1
Bumps MSRV from 1.59 (Feb 2022) to 1.79 (June 2024).
Deprecated1
Deprecates Attribute::unescape_value(), unescape_value_with(), decode_and_unescape_value() and decode_and_unescape_value_with() in favor of the new normalized_value methods.
Attribute::unescape_value()Attribute::unescape_value_with()Attribute::decode_and_unescape_value()Attribute::decode_and_unescape_value_with()