fmi-schema

Crates.iofmi-schema
lib.rsfmi-schema
version0.2.1
sourcesrc
created_at2024-02-11 12:04:05.241166
updated_at2024-10-30 20:00:33.563827
descriptionXML schema support for FMI 2.0 and 3.0
homepagehttps://github.com/jondo2010/rust-fmi
repositoryhttps://github.com/jondo2010/rust-fmi
max_upload_size
id1135797
size109,763
John Hughes (jondo2010)

documentation

README

fmi-schema

github crates.io docs.rs build status

XML schema support for FMI 2.0 and 3.0. This crate is part of rust-fmi.

The reference XSI can be found at https://fmi-standard.org/downloads.

Determining the FMI version

FMI 2.0 and 3.0 have different XML schemas.

The FMI version can initially be determined in a non-specific way by using [minimal::ModelDescription].

Example

# use std::str::FromStr;
let md = fmi_schema::fmi3::Fmi3ModelDescription::from_str(
    std::fs::read_to_string("tests/FMI3.xml").unwrap().as_str(),
)
.unwrap();
println!("{}", md.model_name);

License

Licensed under either of

at your option.

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.

Commit count: 80

cargo fmt