xmlparser
Pull-based, zero-allocation XML parser.
0.13.6
121M downloads/mo
#719 most downloaded on crates.io
RazrFalcon/xmlparser
What this package is like to depend on
Last release 3 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 1.3 years
Nearly every release is documented
notes for 22 of 23 stable releases
1 version withdrawn
withdrawn after publishing
9 years old
24 releases · first in 2017
0 releases in the last 12 months
see the full history below
Release timeline
24 releases · Dec 2017 to Sep 2023Releases
latest 24-
0.13.630 Sep 2023Release notes
Open source →Added
Token::span,Tokenizer::streamand allow cloning ofTokenizer. Thanks to @krtab.
Changed
- Optimize
is_xml_charfunction. Makes parsing 5-10% faster. Thanks to @Simon-Martens.
-
0.13.518 Oct 2022Release notes
Open source →Fixed
- Do no use recursive calls during parsing. Could lead to stack overflow on some input.
- Revert Do not expand predefined references in
Stream::consume_reference. - Tests on Rust 1.61. Thanks to @krtab.
-
0.13.424 Jun 2021 withdrawnRelease notes
Open source →Fixed
- Do not expand predefined references in
Stream::consume_reference. Thanks to @Jesse-Bakker.
- Do not expand predefined references in
-
0.13.302 Sep 2020Release notes
Open source →Changed
- Documentation fixes by @kneasle.
Fixed
DtdEndtoken parsing when]and>are separated by a whitespace.
-
0.13.215 Jun 2020 -
0.13.112 Mar 2020 -
0.13.007 Jan 2020Release notes
Open source →Changed
- Moved to Rust 2018.
- Completely new
Errorenum. - New error messages.
- 10-20% faster parsing.
- Use
Tokenizer::from_fragmentinstead ofTokenizer::enable_fragment_mode.
Removed
TokenType.
-
0.12.021 Dec 2019Release notes
Open source →Changed
]]>is no longer allowed inside a Text node.- Only XML characters are allowed now.
Otherwise,
StreamError::NonXmlCharwill occur. - Disallow
-at the end of a comment.<!--a--->is an error now. - A missing space between attributes is an error now.
StreamError::InvalidQuoteandStreamError::InvalidSpacesignature changed.
-
0.11.018 Nov 2019Release notes
Open source →Added
no_stdsupport thanks to hugwijst.
Changed
StreamError::InvalidStringdoesn't store an actual string now.
-
0.10.014 Sep 2019Release notes
Open source →Changed
- 10-15% faster parsing.
- Merge
ByteStreamandStream. StreamError::InvalidCharsignature changed.StreamError::InvalidCharwas split intoInvalidCharandInvalidCharMultiple.
Fixed
-
Check for NameStartChar during qualified name parsing.
E.g.
<-p>is an invalid tag name from now. -
Qualified name with multiple
:is an error now. -
]>is a valid text/CharDatanow. Previously it was parsed asDoctypeEnd.
Removed
StreamError::InvalidAttributeValue.StreamError::InvalidCharwill be emitted instead.
-
0.9.027 Feb 2019Release notes
Open source →Added
spanfield to allTokenvariants, which contains a whole token span in bytes.Stream::try_consume_byte.
Changed
-
All
Tokenvariants are structs now and not tuples. -
StrSpancontains an actual string span an not only region now.So we can use a non-panic and zero-cost
StrSpan::as_strinstead ofStrSpan::to_str, that was performing slicing each time. -
Split
StreamintoByteStreamandStream. -
Stream::skip_spaceswill parse only ASCII whitespace now. -
Rename
StrSpan::to_strintoStrSpan::as_str. -
Rename
Reference::EntityRefintoReference::Entity. -
Rename
Reference::CharRefintoReference::Char. -
StrSpan::from_substrandStrSpan::slice_regionare private now.
Removed
Token::Whitespaces. Will be parsed asToken::Text.Stream::curr_char.Stream::is_curr_byte_eq.Stream::consume_either.Stream::skip_ascii_spaces. UseStream::skip_spacesinstead.StrSpan::trim.StrSpan::len.StrSpan::full_len.StrSpan::as_bytes.
Fixed
- Declaration attributes with mixed quotes parsing.
-
0.8.102 Jan 2019 -
0.8.013 Dec 2018Release notes
Open source →Added
Error::pos().
Changed
- Rename
Stream::gen_error_posintoStream::gen_text_pos. - Rename
Stream::gen_error_pos_fromintoStream::gen_text_pos_from. Stream::gen_text_posspeed up.
Fixed
TextPosis Unicode aware now.- XML declaration parsing when file has a BOM.
-
0.7.029 Oct 2018Release notes
Open source →Changed
<inside an attribute value is an error now.Token::Declarationrepresents standalone asboolnow.- XML declaration must be defined only once now.
- XML declaration must start at 0 position.
- DTD must be defined only once now.
-
0.6.108 Oct 2018 -
0.6.031 Aug 2018Release notes
Open source →Changed
Reference::EntityRefcontains&strand notStrSpannow.- Rename
Stream::try_consume_char_referenceintotry_consume_reference. And it will returnReferenceand notcharnow. - Rename
Tokenizer::set_fragment_modeintoenable_fragment_mode. - Rename
ErrorPosintoTextPos.
Fixed
TextPoscalculation viaStream::gen_error_pos.
Removed
TextUnescapeandXmlSpacebecause useless.
-
0.5.014 Jun 2018Release notes
Open source →Added
StreamError::InvalidChar.StreamError::InvalidSpace.StreamError::InvalidString.
Changed
Stream::consume_referencewill return onlyInvalidReferenceerror from now.Error::InvalidTokenWithCausemerged intoError::InvalidToken.Stream::gen_error_pos_fromdoes not requiremut selffrom now.StreamError::InvalidCharrequiresVec<u8>and notStringfrom now.ErrorPosusesu32and notusizefrom now.
Removed
failuredependency.logdependency.
-
0.4.123 May 2018 -
0.4.021 Apr 2018Release notes
Open source →Changed
- Relicense from MIT to MIT/Apache-2.0.
Removed
FromSpantrait.from_strandfrom_spanmethods are removed. Use theFromtrait instead.
-
0.3.010 Apr 2018Release notes
Open source →Changed
- Use
failureinstead oferror-chain. - Minimum Rust version is 1.18.
- New error messages.
TokenTypeis properly public now.
Removed
ChainedError
- Use
-
0.2.011 Mar 2018Release notes
Open source →Added
- Qualified name parsing.
Changed
- Breaking.
Token::ElementStartandToken::Attributecontains prefix and local part of the qualified name now.
-
0.1.212 Feb 2018 -
0.1.117 Jan 2018 -
0.1.015 Dec 2017Nothing published for this version