roxmltree
Represent an XML as a read-only tree.
0.21.1
67M downloads/mo
#1036 most downloaded on crates.io
RazrFalcon/roxmltree
What this package is like to depend on
Last release 10 months ago
12 Oct 2025
Release timing varies
gaps range from 8 days to 1.4 years
Nearly every release is documented
notes for 31 of 32 stable releases
2 versions withdrawn
withdrawn after publishing
8 years old
34 releases · first in 2018
2 releases in the last 12 months
see the full history below
Release timeline
34 releases · Aug 2018 to Oct 2025
2019
2020
2021
2022
2023
2024
2025
2026
Releases
latest 34-
0.21.112 Oct 2025Release notes
Open source →Fixed
- Remove implict
'staticlifetime bound onEntityResolverdyn trait type alias. - Upgrade
EntityResolverdyn trait type alias fromFnMuttoFnto resolve lifetime issues.
- Remove implict
-
0.21.004 Oct 2025 withdrawnRelease notes
Open source →Added
ParsingOptions::entity_resolvercan be used to resolve external entities referenced via public ID and URI.
Changed
Node::has_attribute,Node::attributeandNode::attribute_nodematch local names similar to howNode::has_tag_nameworks.- Various internal performance improvements, e.g. devirtualization of token dispatch and usage of
memchrfor finding delimiters.
Fixed
- Possible panic when entity resolution yields unbalanced tags.
- Quadratic runtime when merging consecutive text nodes.
-
0.20.023 May 2024Release notes
Open source →Added
Attribute::range,Attribute::range_qname,Attribute::range_value. Thanks to @Jayonas
Changed
Attribute::positionis deprecated now.- The
positionsbuild feature uses a bit more memory now to better preserve attribute ranges.
-
0.19.018 Nov 2023Release notes
Open source →Changed
xmlparseris no longer a dependency and its fork is used internally.- ~5% faster parsing.
- Fallback to
RcwhenArcisn't available. - Bump MSRV to 1.60
- Bump edition to 2021
Errorvariants have changed quite a lot.- XML declaration validation was simplified. We no longer check for attributes content.
Meaning that
version,encodingandstandalonecan contain any value now. But we still do check attribute names and order.<br/> And while we did validated those attributes before, they weren't really affecting the parser in any way. Therefore the parsing behavior is mostly unchanged.
Fixed
ParsingOptions::allow_dtd = falsewould not trigger an error when an empty DTD was present.
Removed
- The
xmlparserdependency.
-
0.18.130 Sep 2023Release notes
Open source →Added
ExpandedName::from_static. Thanks to @WhyNotHugo
Fixed
- Replace
\rin CDATA as well. no_stdbuild. Thanks to @wenyuzhao
-
0.18.004 Feb 2023Release notes
Open source →Added
StringStoragethat exposes an internal string storage.- Allocated strings are stored as
Arc<str>and notStringnow. Node::text_storageNode::tail_storageAttribute::value_storageNode::range
Removed
Node::position. UseNode::rangeinstead.
Fixed
- Some methods return longer lifetimes now. Thanks to @adamreichold
- Overly verbose Debug implementations. Thanks to @adamreichold
-
0.17.006 Jan 2023Release notes
Open source →Added
- Stored namespaces are deduplicated now, which can reduce memory usage on large files up to 10%. Thanks to @adamreichold
Changed
Node::namespacesreturns an iterator and not a slice now.
Fixed
- Unclosed root element is an error now. Thanks to @adamreichold
-
0.16.021 Nov 2022Release notes
Open source →Added
positionsbuild feature.Node::positionAttribute::positionParsingOptions::nodes_limitto limit the maximum number of nodes to parse.
Changed
- Peak memory usage reduces by up to 20% depending on an input. Thanks to @adamreichold and @tomjw64.
Node::attributesreturns an iterator and not a slice now.
Removed
- 4GB input limit.
- Do not store Node and Attribute end range in the original document.
- Do not store attribute value range in the original document.
Node::range. Usepositioninstead.Attribute::range. Usepositioninstead.Attribute::value_range
-
0.15.118 Oct 2022 -
0.15.015 Aug 2022Release notes
Open source →Changed
- Extend
Document::descendantslifetime. Thanks to @DBLouis. - Derive
EqandHashforNodeId. - Remove
pretty_assertionsdev-dependency. - MSRV is now 1.36
- Extend
-
0.14.101 Apr 2021 -
0.14.027 Dec 2020Release notes
Open source →Added
- An ability to reject XML with DTD in it.
- The library is no_std + alloc now.
ParsingOptionsDocument::parse_with_optionsError::DtdDetected
-
0.13.119 Dec 2020 -
0.13.020 Jun 2020 -
0.12.020 Jun 2020 -
0.11.119 Jun 2020 withdrawn -
0.11.019 Apr 2020Release notes
Open source →Added
- Implement
Ord,PartialOrdandHashforNode. Thanks to [@tomjw64]. NodeId,Document::get_nodeandNode::id. Thanks to [@tomjw64].
Changed
- The input data size is limited by 4GiB now.
Nodecan be accessed from multiple threads now.- Reduce
Nodememory usage. - Greatly optimized
Descendantsiterator. Up to 5x faster in some cases. Thanks to [@tomjw64]. - Heavily reduce memory usage when document has a lot of namespaces. Thanks to [@tomjw64].
Removed
Node::traverse,TraverseandEdge. UseNode::descendantsinstead.
- Implement
-
0.10.128 Mar 2020Release notes
Open source →Fixed
Node::prev_sibling_elementandNode::next_sibling_elementwere returning the current node.
-
0.10.018 Mar 2020Release notes
Open source →Added
Document::input_text
Changed
Ancestors,PrevSiblings,NextSiblings,FirstChildrenandLastChildrenwere replaced withAxisIter.
Fixed
- Root node range.
-
0.9.109 Feb 2020Release notes
Open source →Changed
- A better entity loop detection. A document can have an unlimited number of references at zero depth now.
-
0.9.007 Jan 2020 -
0.8.021 Dec 2019Release notes
Open source →Added
Error::MalformedEntityReference
Changed
- Malformed entity reference is an error now.
- Escaped
<in attribute inside an ENTITY is an error now. xmlparserupdated with multiple fixes.
-
0.7.313 Nov 2019Release notes
Open source →Changed
- Use unconstrained lifetimes for the
attributefunctions. By myrrlyn.
- Use unconstrained lifetimes for the
-
0.7.207 Nov 2019 -
0.7.114 Sep 2019 -
0.7.006 Aug 2019Release notes
Open source →Added
Node::prev_sibling_elementandNode::next_sibling_element.
Changed
- (breaking)
Node::ancestorsincludes the current node now. Attributeis cloneable now.
Fixed
- Namespaces resolving with equal URI's.
Removed
Node::resolve_tag_name_prefix.
-
0.6.118 Jun 2019 -
0.6.003 Mar 2019Release notes
Open source →Added
Error::UnknownNamespace.
Fixed
- Unknown namespace prefixes will cause an error now.
-
0.5.027 Feb 2019Release notes
Open source →Added
Node::range.Node::attribute_node.Attribute::range.Attribute::value_range.
Changed
- Rename
text_pos_fromintotext_pos_at.
Removed
Node::pos. UseNode::rangeinstead.Node::node_pos. Usedoc.text_pos_at(node.range().start)instead.Node::attribute_pos.Node::attribute_value_pos.Attribute::pos. UseAttribute::rangeinstead.Attribute::value_pos. UseAttribute::value_rangeinstead.
-
0.4.102 Jan 2019 -
0.4.013 Dec 2018 -
0.3.029 Oct 2018Release notes
Open source →Changed
- Store text nodes as
&strwhen possible. On an XML with a lot of simple text can be ~2x faster. Documentno longer implementsPartialEq.
Fixed
- Entity and character references resolving inside a text.
- Store text nodes as
-
0.2.008 Oct 2018Release notes
Open source →Added
Error::EntityReferenceLoop.- Nested entity references support.
Changed
Attribute::namespacewill returnOptionnow.ExpandedName::namespacewill returnOptionnow.Namespace::namewill returnOptionnow.Node::resolve_tag_name_prefixwill returnOptionnow.Node::lookup_namespace_uriacceptsOption<&str>and not&strnow.- Performance optimizations.
Removed
ExpandedName::has_namespace.ExpandedName::namespacewill returnOptionnow.Error::NestedEntityReference.
-
0.1.031 Aug 2018Nothing published for this version