#xml #xsd #xml-data #encoder #decoder #codec

xmlschema

XML Schema validator and data conversion library for Rust

1 unstable release

0.0.1 Feb 18, 2023

#8 in #xsd

MIT/Apache

42KB
539 lines

xmlschema

XML Schema validator and data conversion library for Rust.

Made With Love Crates.io Lib.rs Docs.rs License

divider

Welcome to XML Schema 👋

XML Schema Banner

Website â€ĸ Documentation â€ĸ Report Bug â€ĸ Request Feature â€ĸ Contributing Guidelines

Overview 📖

The xmlschema library is an implementation of XML Schema for Rust. It provides a set of functions to validate XML documents against an XML Schema Definition (XSD) file and to convert XML documents to JSON and vice versa.

Features ✨

This library aims to include the following features:

  • Full XSD 1.0 and XSD 1.1 support
  • Building of XML schema objects from XSD files
  • Validation of XML instances against XSD schemas
  • Decoding of XML data into Python data and to JSON
  • Encoding of Rust data and JSON to XML

Installation đŸ“Ļ

It takes just a few minutes to get up and running with xmlschema.

Requirements

xmlschema requires Rust 1.67.1 or later.

Documentation

ℹī¸ Info: Please check out our website for more information and find our documentation on docs.rs, lib.rs and crates.io.

Usage 📖

To use xmlschema in your project, add the following to your Cargo.toml file:

[dependencies]
xmlschema = "0.0.1"

Add the following to your main.rs file:

extern crate xmlschema;
use xmlschema::*;

then you can use the functions in your application code.

Examples

XML Schema comes with a set of examples that you can use to get started. The examples are located in the examples directory of the project. To run the examples, clone the repository and run the following command in your terminal from the project root directory.

cargo run --example xmlschema

Semantic Versioning Policy đŸšĨ

For transparency into our release cycle and in striving to maintain backward compatibility, XML Schema follows semantic versioning.

License 📝

The project is licensed under the terms of both the MIT license and the Apache License (Version 2.0).

Contribution 🤝

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

divider

Acknowledgements 💙

A big thank you to all the awesome contributors of Mini Functions for their help and support. A special thank you goes to the Rust Reddit community for providing a lot of useful suggestions on how to improve this project.

No runtime deps