Skip to content

Releases: KWARC/rust-libxml

Improved error reporting for schema validation

18 Jul 14:27
Compare
Choose a tag to compare

This release contains the improvements from PR #116 , as well as some minor hygiene maintenance.

[minor] Add Context::findvalue, Node::findvalue

07 Mar 21:43
Compare
Choose a tag to compare

See #108 for details.

Also, the release pages here haven't been maintained that carefully, consult the CHANGELOG for details.

Schema support and document serialization

16 Jan 15:18
Compare
Choose a tag to compare

[0.2.13] 2020-16-01

Thanks to @jangernert for the upgrades to Document serialization.
Thanks to @lweberk for contributing the Schema featureset and to @cbarber for refining the FFI interop.

Added

  • Document::to_string_with_options allowing to customize document serialization
  • Document::SaveOptions containing the currently supported serialization options, as provided internally by libxml
  • Schema holding and managing xmlSchemaPtr as created while parsing by SchemaParserContext
  • SchemaParserContext holding source of XSD and parsing into a Schema while gathering and –in case returning– errors that arise from the XSD parser across the FFI to libxml
  • SchemaValidationContext holding the Schema from resulting SchemaParserContext parse and offering validation methods for Document, Node or file path to XML, while gathering and –in case returning– validation errors from the XML validator across the FFI to libxml

Changed

  • the Document::to_string() serialization method is now implemented through fmt::Display and no longer takes an optional boolean flag. The default behavior is now unformatted serialization - previously to_string(false), while to_string(true) can be realized via
  .to_string_with_options(SaveOptions { format: true, ..SaveOptions::default()})`

See #58 and #64 for implementation details.

BOM-aware XML support

16 Jun 09:42
Compare
Choose a tag to compare

Thanks to @Alexhuszagh for the upgrades in this release, see #33 for details.

Added

  • BOM-aware Unicode support
  • New Parser methods allowing to specify an explicit encoding: parse_file_with_encoding, parse_string_with_encoding, is_well_formed_html_with_encoding

Changed

  • Default encodings in Parser are now left for libxml to guess internally, rather than defaulted to utf-8.

RoNode: read-only parallelization with minimal overhead

14 Apr 21:10
Compare
Choose a tag to compare

Introducing a rayon-compatible primtive, RoNode, which allows for parallel read-only document scans. See #53 for details

Example use:

fn dfs_parallel_count(node: RoNode) -> i32 {
  1 + node
    .get_child_nodes()
    .into_par_iter()
    .map(dfs_parallel)
    .sum::<i32>()
}

MacOS build fix

26 Mar 00:28
Compare
Choose a tag to compare

Minor release for better cross-platform crate builds. See #48 for details

Minor, added Node::null

27 Sep 03:00
Compare
Choose a tag to compare

Added

  • Node::null placeholder that avoids the tricky memory management of Node::mock that can lead to memory leaks. Really a poor substitute for the better Option<Node> type with a None value, which is recommended instead.

Multi-document workflow patches

24 Sep 15:50
Compare
Choose a tag to compare

Now using weaker references for an object's owner Document. See #42 for details

Minor release, Node::findnodes

20 Sep 02:35
Compare
Choose a tag to compare

Improve XPath API, with minor internal refactor. See #41 for details.

Expose libxml2 pointer getters to public API

23 Jul 20:40
00947f0
Compare
Choose a tag to compare
  • Expose the underlying libxml2 data structures in the public crate interface, to enable a first libxslt crate proof of concept.