Skip to content

v0.38.0 - Better support of references (&...;)

Compare
Choose a tag to compare
@Mingun Mingun released this 28 Jun 21:02
· 46 commits to master since this release

What's Changed

Significant changes

Now references to entities (as predefined, such as <, as user-defined) reported as a new Event::GeneralRef.
Caller can parse the content of the entity and stream events from it as it is required by the XML specification. See the updated custom_entities example!

Implement whitespace behavior in the standard in Deserializer, which says string primitive types should preserve whitespace, while all other primitives have collapse behavior.

New Features

  • #863: Add Attributes::into_map_access(&str) and Attributes::into_deserializer() when serialize feature is enabled. This will allow do deserialize serde types right from attributes. Both methods returns the same type which implements serde's Deserializer and MapAccess traits.
  • #766: Allow to parse resolved entities as XML fragments and stream events from them.
  • #766: Added new event Event::GeneralRef with content of general entity.
  • #766: Added new configuration option allow_dangling_amp which allows to have a & not followed by ; in the textual data which is required for some applications for compatibility reasons.
  • #285: Add ability to quick_xml::de::Text to access text with trimmed spaces

Bug Fixes

  • #868: Allow to have both $text and $value special fields in one struct. Previously any text will be recognized as $value field even when $text field is also presented.
  • #868: Skip text events when deserialize a sequence of items overlapped with text (including CDATA).
  • #841: Do not strip xml prefix from the attributes when map them to struct fields in Deserializer.

Misc Changes

  • #863: Remove From<QName<'a>> for BytesStart<'a> because now BytesStart stores the encoding in which its data is encoded, but QName is a simple wrapper around byte slice.
  • #766: BytesText::unescape and BytesText::unescape_with replaced by BytesText::decode. Now Text events does not contain escaped parts which are reported as Event::GeneralRef.

New Contributors

Full Changelog: v0.37.5...v0.38.0