rxml
Minimalistic, restricted XML 1.0 parser which does not include dangerous XML features.
0.14.0
5.7M downloads/mo
#4266 most downloaded on crates.io
source
What this package is like to depend on
Last release 6 months ago
21 Feb 2026
Release timing varies
gaps range from 2 weeks to 1.1 years
Some releases are documented
notes for 9 of 21 stable releases
1 version withdrawn
withdrawn after publishing
5 years old
22 releases · first in 2021
3 releases in the last 12 months
see the full history below
Release timeline
22 releases · May 2021 to Feb 2026Releases
latest 22-
0.14.021 Feb 2026Release notes
Open source →Breaking changes
-
Further work on the
Namespacetype. It now has a lifetime to allow
for borrows. It is also used in several places throughout the code
now. -
Support for parsing comments was added. This breaks code which
constructs the Options struct manually, as it gained a newcomments
field.Defaulting this field or setting it explicitly to
CommentMode::Rejectpreserves the previous behaviour of rejecting
comments.
Improvements
-
Name and NcName are now exposed in no_std environments.
-
Global prefix declarations in SimpleNamespaces will now also be used
for namespaced attributes (instead of generating a temporary prefix). -
Support for additional platforms, gated behind the
extra-platforms
feature flag.Note that this is likely to have bad performance, because a
critical-section will have to be acquired for every Arc operation
(which is the backing storage for theNamespaceenum!).Future versions may improve upon this by disabling the Arc variant of
Namespacewhen built withextra-platformsor similar workarounds.
Bug fixes
- Fix benchmarks failing to build on no_std (they are now (correctly)
skipped).
-
-
0.13.303 Oct 2025Release notes
Open source →-
Fix overly strict lifetimes in XmlMap::get and XmlMap::get_mut.
-
Make the xml_ncname! and xml_name! macro exports from rxml usable
through re-exports.This requires bumping rxml_proc to 0.12.1.
This release was originally numbered 0.13.2, but due to the issue in rxml_proc 0.12.0, we cut a second release to ensure that rxml depends on the fixed version only.
-
-
0.13.203 Oct 2025 withdrawnNothing published for this version
-
0.13.122 Apr 2025Release notes
Open source →This release fixes two documentation oversights in 0.13.0:
- The
stdfeature was not documented. - The items requiring
stdwere not marked.
- The
-
0.13.022 Apr 2025Release notes
Open source →-
rxml now consistently uses single quotes for all XML attributes. This may break your tests if you did exact string matching against rxml output. Thanks @linkmauve.
-
rxml now uses Rust edition 2021. Thanks @linkmauve.
-
rxml is now
no_std-capable (but needsallocin any case). Disabling the enabled-by-defaultstdfeature will remove a couple of types from the public API. Due to an oversight, the affected types are not marked in the documentation and thestdfeature itself is also not documented. This will be fixed in 0.13.1.Thanks @linkmauve.
-
Helpers to work with the special
xml:langattribute were added, seeXmlLangTrackerand thexml_langmodule. -
Various code cleanup tasks such as fixing clippy warnings (thanks @linkmauve).
-
Bumped the compact_str dependency (thanks @linkmauve).
All over all, 0.13.0 seems to improve parsing performance by roughly 15%.
-
-
0.12.012 Aug 2024Release notes
Open source →This release carries more breaking changes which do not have seamless deprecations than previous releses.
-
The error types were reworked completely. Aside from the obvious renaming which went down, one thing is particularly notable: The high level objects (
Reader/AsyncReader) now returnstd::io::Errorinstead of directly returningrxml::Error.Any rxml error from a reader will cause an
io::Errorwithio::ErrorKind::InvalidData. The original error can be extracted with the corresponding functions onio::Error(most notably,io::Error::downcast) if necessary.The
rxml::error::XmlErrortype was flattened intorxml::Erroras a follow-up to that. The writer/encoder now also usesrxml::Errorinstead of its own error type, simplifying the use in full-duplex applications (e.g.tokio_utilcodecs). -
The
AsyncReaderwas made more versatile, by loosening trait bounds and providing functions for accessing its inner state while pinned. -
Support for controlling the buffering of incoming text nodes was added. The default behaviour of buffering parsed text up to the maximum token size or a delimiting syntax element (such as start of a child element) is preserved. However, users can now turn that off in order to receive text data which is parsed immediately when it is available.
-
-
0.11.123 Jun 2024Release notes
Open source →This release is a minor feature release which adds the
Debugtrait torxml::writer::Item, nothing more. -
0.11.015 Jun 2024Release notes
Open source →This release continues the path started with 0.10.0 to simplify the public API. Thus, this release contains once more a couple of breaking changes. We tried to introduce compatibility aliases and such in order to ease the transition. In case you get stuck upgrading from 0.10.0, we'd nevertheless like you to not hesitate to file an issue to get help.
Notable changes from 0.10.0:
-
ResolvedQNameandResolvedEventhave been re-renamed toQNameandEvent, respectively. As those are most often used, it makes sense to make their names short. -
A new
Namespacetype was introduced. It contains a namespace name (i.e. a URI). Previously, that was done withRcPtr<CData>, which led to some inefficiencies around statically known namespaces, as well as nuisances around use in map types.The
Namespacetype should be more usable thanRcPtr<CData>throughout. -
A new
AttrMaptype (and its generic form,XmlMap) was introduced.XmlMapallows to map a qualified name tuple (namespace uri and local name) to a generic type. It exists because using tuple keys with the standard libraries map types is quite annoying and inefficient.AttrMapis a type alias which specialisesXmlMapfor string values, and it is used for attributes throughout the public API now. -
bytes::Bufwas removed from the internal APIs and from the main parsing entrypoint (Parse::parse). A helper method for parsingBufobjects exists (Parse::parse_buf) but it now must be used explicitly. The main APIs now only offer&[u8]inputs, which is more efficient. -
The string types have been moved to
rxml_validation(while still being re-exported byrxml, and they will continue to be). This allows use of strongly typed validated strings in proc macros besidesrxml_proc. -
The
CDatatype has been removed. The benefits it brought did not outweigh the explicit type casts and error handling required at various places in user code. The error handling for invalid data is now concentrated at serialisation time. -
smartstringwas removed in favour ofcompact_str. The feature flag has been renamed accordingly.compact_stris more efficient and has better code quality. Seeeb3d18bfor details. -
The
syncfeature is now deprecated, as its functionality is now enabled by default. -
A minor bookkeeping mistake in the event metrics around element footers was fixed.
-
The incorrect InvalidUtf8Byte error emitted if an UTF-8 sequence straddled a text token boundary was fixed (same fix as in 0.10.1; see #15 on Codeberg for more details).
-
Some feature flags and types deprecated in 0.10.0 have been removed.
-
-
0.10.108 Jun 2024Release notes
Open source →This release is a bugfix release.
Bugs fixed:
-
Incorrect InvalidUtf8Byte error if an UTF-8 sequence straddled a text
token boundary
#15.Thanks @meezookee for the report!
-
-
0.10.016 Mar 2024Release notes
Open source →This release contains a major refactor of the public API for all things
related to parsing XML. This is to make the API easier to use.Notable changes:
- The code is now hosted on codeberg.org instead of github.com.
- Everything related to the
Lexerhas been removed from the public API NamespaceResolverhas been moved from the crate root torxml::parserPullDriver,PushDriverandAsyncDriverhave been removed; there are transitional type aliases which should help the migration.- The
EventReadandAsyncEventReadtraits have been removed; they are now unnecessary. - If you have been using the
FeedParserorPushDriver, you will now need to import therxml::Parsetrait. - Some items which have been deprecated since 0.8 or earlier have been deleted.
In general, the deprecation notices should help the migration. If you don't know how to proceed the upgrade, please file an issue.
-
0.9.125 Jan 2023Nothing published for this version
-
0.8.217 Dec 2022Nothing published for this version
-
0.8.115 May 2022Nothing published for this version
-
0.8.023 Apr 2022Nothing published for this version
-
0.7.112 Apr 2022Nothing published for this version
-
0.7.011 Apr 2022Nothing published for this version
-
0.6.025 Mar 2022Nothing published for this version
-
0.5.015 Dec 2021Nothing published for this version
-
0.4.018 Aug 2021Nothing published for this version
-
0.3.026 Jun 2021Nothing published for this version
-
0.2.016 May 2021Nothing published for this version
-
0.1.014 May 2021Nothing published for this version