Update Rust crate quick-xml to 0.33.0 #102
Reference in New Issue
Block a user
No description provided.
Delete Branch "renovate/quick-xml-0.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
0.31.0->0.33.0Release Notes
tafia/quick-xml (quick-xml)
v0.33.0Compare Source
New Features
From<QName>forBytesStartandBytesEnd.Bug Fixes
trim_text_start = falseandtrim_text_end = true.Misc Changes
Event::PIto a new dedicatedBytesPItype.constas much functions as possible:resolve_html5_entity()resolve_predefined_entity()resolve_xml_entity()Attr::key()Attr::value()Attributes::html()Attributes::new()BytesDecl::from_start()Decoder::encoding()Deserializer::get_ref()IoReader::get_ref()LocalName::into_inner()Namespace::into_inner()NsReader::config()NsReader::prefixes()Prefix::into_inner()QName::into_inner()Reader::buffer_position()Reader::config()Reader::decoder()Reader::error_position()Reader::get_ref()SliceReader::get_ref()Writer::get_ref()Writer::new()quick_xml::escape::resolve_html5_entityunderescape-htmlfeature again.This function has significant influence to the compilation time (10+ seconds or 5x times)
v0.32.0Compare Source
The way to configure parser is changed. Now all configuration is contained in the
Configstruct and can be applied at once. Whenserde-typesfeature is enabled,configuration is serializable.
The method of reporting positions of errors has changed - use
error_position()to get an offset of the error position. For
SyntaxErrors the rangeerror_position()..buffer_position()also will represent a span of error.The way of resolve entities with
unescape_withare changed. Those methods no longerresolve predefined entities.
New Features
Error::IllFormed.config()andconfig_mut()to inspect and change the parserconfiguration. Previous builder methods on
Reader/NsReaderwas replaced bydirect access to fields of config using
reader.config_mut().<...>.Config::enable_all_checksto turn on or off allwell-formedness checks.
escape::minimal_escape()which escapes only&and<.BytesCData::minimal_escape()which escapes only&and<.Serializer::set_quote_level()which allow to set desired level of escaping.NsReader::prefixes()to list all the prefixes currently declared.impl_deserialize_for_internally_tagged_enummacro so thatit can handle every attribute that does not match existing cases within an enum variant.
Writer::create_element. This is breaking change!ElementWriter::new_line()which enables pretty printing elements with multiple attributes.Deserializer::get_ref()to get XML Reader from serde Deserializerquick_xml::escape::resolve_predefined_entityquick_xml::escape::resolve_xml_entityquick_xml::escape::resolve_html5_entityquick_xml::reader::PiParser.quick_xml::reader::ElementParser.Bug Fixes
<.Error::IllFormed(DoubleHyphenInComment).Error::IllFormed(MissingDoctypeName).expand_empty_elementsis set to true.Misc Changes
quick_xml::Errortype to provide more accurate information:Error::EndEventMismatchreplaced byIllFormedError::MismatchedEndTagin some casesError::EndEventMismatchreplaced byIllFormedError::UnmatchedEndTagin some casesError::TextNotFoundwas removed because not usedError::UnexpectedBangreplaced bySyntaxErrorError::UnexpectedEofreplaced bySyntaxErrorin some casesError::UnexpectedEofreplaced byIllFormedErrorin some casesError::UnexpectedTokenreplaced byIllFormedError::DoubleHyphenInCommentError::XmlDeclWithoutVersionreplaced byIllFormedError::MissingDeclVersion(in #684)Error::EmptyDocTypereplaced byIllFormedError::MissingDoctypeName(in #684)SyntaxErrors: now they are always pointsto the start of markup (i. e. to the
<character) with error. Useerror_position()for that.
<??>parsed asEvent::PIwith empty content instead of raisingsyntax error.
<?xml?>parsed asEvent::Declinstead ofEvent::PI.QuoteLevel::Partialwhen using serde serializer.buffer_position()now always report the position the parser last seen.To get an error position use
error_position().intermediate custom deserializer.
Clonefor [DeEvent][DeEvent], [PayloadEvent][PayloadEvent] and [Text][Text].NoEntityResolvertoPredefinedEntityResolver.lt,gt,apos,quot,amp)in
unescape_withfamily of methods. You should do that by yourself using the methodslisted above.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.
Edited/Blocked Notification
Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.
You can manually request rebase by checking the rebase/retry box above.
⚠️ Warning: custom changes will be lost.