v0.38.0 - Better support of references (&...;)
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)andAttributes::into_deserializer()whenserializefeature is enabled. This will allow do deserialize serde types right from attributes. Both methods returns the same type which implements serde'sDeserializerandMapAccesstraits. - #766: Allow to parse resolved entities as XML fragments and stream events from them.
- #766: Added new event
Event::GeneralRefwith content of general entity. - #766: Added new configuration option
allow_dangling_ampwhich allows to have a¬ followed by;in the textual data which is required for some applications for compatibility reasons. - #285: Add ability to
quick_xml::de::Textto access text with trimmed spaces
Bug Fixes
- #868: Allow to have both
$textand$valuespecial fields in one struct. Previously any text will be recognized as$valuefield even when$textfield is also presented. - #868: Skip text events when deserialize a sequence of items overlapped with text (including CDATA).
- #841: Do not strip
xmlprefix from the attributes when map them to struct fields inDeserializer.
Misc Changes
- #863: Remove
From<QName<'a>> for BytesStart<'a>because nowBytesStartstores the encoding in which its data is encoded, butQNameis a simple wrapper around byte slice. - #766:
BytesText::unescapeandBytesText::unescape_withreplaced byBytesText::decode. Now Text events does not contain escaped parts which are reported asEvent::GeneralRef.
New Contributors
- @Dr-Emann made their first contribution in #860
- @maxence-cornaton made their first contribution in #864
- @dizzyi made their first contribution in #866
- @eirnym made their first contribution in #870
- @ggodlewski made their first contribution in #865
- @curatorsigma made their first contribution in #873
Full Changelog: v0.37.5...v0.38.0