All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
0.20.0 - 2024-05-23
Attribute::range
,Attribute::range_qname
,Attribute::range_value
. Thanks to @Jayonas
Attribute::position
is deprecated now.- The
positions
build feature uses a bit more memory now to better preserve attribute ranges.
0.19.0 - 2023-11-18
xmlparser
is no longer a dependency and its fork is used internally.- ~5% faster parsing.
- Fallback to
Rc
whenArc
isn't available. - Bump MSRV to 1.60
- Bump edition to 2021
Error
variants have changed quite a lot.- XML declaration validation was simplified. We no longer check for attributes content.
Meaning that
version
,encoding
andstandalone
can contain any value now. But we still do check attribute names and order.
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.
ParsingOptions::allow_dtd = false
would not trigger an error when an empty DTD was present.
- The
xmlparser
dependency.
0.18.1 - 2023-09-30
ExpandedName::from_static
. Thanks to @WhyNotHugo
- Replace
\r
in CDATA as well. no_std
build. Thanks to @wenyuzhao
0.18.0 - 2023-02-04
StringStorage
that exposes an internal string storage.- Allocated strings are stored as
Arc<str>
and notString
now. Node::text_storage
Node::tail_storage
Attribute::value_storage
Node::range
Node::position
. UseNode::range
instead.
- Some methods return longer lifetimes now. Thanks to @adamreichold
- Overly verbose Debug implementations. Thanks to @adamreichold
0.17.0 - 2023-01-06
- Stored namespaces are deduplicated now, which can reduce memory usage on large files up to 10%. Thanks to @adamreichold
Node::namespaces
returns an iterator and not a slice now.
- Unclosed root element is an error now. Thanks to @adamreichold
0.16.0 - 2022-11-20
positions
build feature.Node::position
Attribute::position
ParsingOptions::nodes_limit
to limit the maximum number of nodes to parse.
- Peak memory usage reduces by up to 20% depending on an input. Thanks to @adamreichold and @tomjw64.
Node::attributes
returns an iterator and not a slice now.
- 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
. Useposition
instead.Attribute::range
. Useposition
instead.Attribute::value_range
0.15.1 - 2022-10-18
- Bump
xmlparser
to prevent stack overflow on some input.
0.15.0 - 2022-08-15
- Extend
Document::descendants
lifetime. Thanks to @DBLouis. - Derive
Eq
andHash
forNodeId
. - Remove
pretty_assertions
dev-dependency. - MSRV is now 1.36
0.14.1 - 2021-04-01
- The
std
feature is enabled by default now.
0.14.0 - 2020-12-27
- An ability to reject XML with DTD in it.
- The library is no_std + alloc now.
ParsingOptions
Document::parse_with_options
Error::DtdDetected
0.13.1 - 2020-12-19
Debug
for all public types.
0.13.0 - 2020-06-20
- Better
ExpandedName
lifetimes. Thanks to @eduardosm.
0.12.0 - 2020-06-20
- Re-release 0.11.1, since it had a breaking change.
0.11.1 - 2020-06-19
- Extend
ExpandedName
lifetime. Thanks to @rkusa.
0.11.0 - 2020-04-19
- Implement
Ord
,PartialOrd
andHash
forNode
. Thanks to @tomjw64. NodeId
,Document::get_node
andNode::id
. Thanks to @tomjw64.
- The input data size is limited by 4GiB now.
Node
can be accessed from multiple threads now.- Reduce
Node
memory usage. - Greatly optimized
Descendants
iterator. Up to 5x faster in some cases. Thanks to @tomjw64. - Heavily reduce memory usage when document has a lot of namespaces. Thanks to @tomjw64.
Node::traverse
,Traverse
andEdge
. UseNode::descendants
instead.
0.10.1 - 2020-03-28
Node::prev_sibling_element
andNode::next_sibling_element
were returning the current node.
0.10.0 - 2020-03-18
Document::input_text
Ancestors
,PrevSiblings
,NextSiblings
,FirstChildren
andLastChildren
were replaced withAxisIter
.
- Root node range.
0.9.1 - 2020-02-09
- A better entity loop detection. A document can have an unlimited number of references at zero depth now.
0.9.0 - 2020-01-07
- Moved to Rust 2018.
xmlparser
updated.
0.8.0 - 2019-12-21
Error::MalformedEntityReference
- Malformed entity reference is an error now.
- Escaped
<
in attribute inside an ENTITY is an error now. xmlparser
updated with multiple fixes.
0.7.3 - 2019-11-14
- Use unconstrained lifetimes for the
attribute
functions. By myrrlyn.
0.7.2 - 2019-11-07
- Use longer lifetimes in
Document::root_element
. By myrrlyn.
0.7.1 - 2019-09-14
- Update
xmlparser
.
0.7.0 - 2019-08-06
Node::prev_sibling_element
andNode::next_sibling_element
.
- (breaking)
Node::ancestors
includes the current node now. Attribute
is cloneable now.
- Namespaces resolving with equal URI's.
Node::resolve_tag_name_prefix
.
0.6.1 - 2019-06-18
- Namespace resolving.
0.6.0 - 2019-03-03
Error::UnknownNamespace
.
- Unknown namespace prefixes will cause an error now.
0.5.0 - 2019-02-27
Node::range
.Node::attribute_node
.Attribute::range
.Attribute::value_range
.
- Rename
text_pos_from
intotext_pos_at
.
Node::pos
. UseNode::range
instead.Node::node_pos
. Usedoc.text_pos_at(node.range().start)
instead.Node::attribute_pos
.Node::attribute_value_pos
.Attribute::pos
. UseAttribute::range
instead.Attribute::value_pos
. UseAttribute::value_range
instead.
0.4.1 - 2019-01-02
- Use longer lifetimes in return types. By tmiasko.
0.4.0 - 2018-12-13
Error::pos()
.
0.3.0 - 2018-10-29
- Store text nodes as
&str
when possible. On an XML with a lot of simple text can be ~2x faster. Document
no longer implementsPartialEq
.
- Entity and character references resolving inside a text.
0.2.0 - 2018-10-08
Error::EntityReferenceLoop
.- Nested entity references support.
Attribute::namespace
will returnOption
now.ExpandedName::namespace
will returnOption
now.Namespace::name
will returnOption
now.Node::resolve_tag_name_prefix
will returnOption
now.Node::lookup_namespace_uri
acceptsOption<&str>
and not&str
now.- Performance optimizations.
ExpandedName::has_namespace
.ExpandedName::namespace
will returnOption
now.Error::NestedEntityReference
.