[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE-MIT)
[![Apache License 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE-APACHE)
[![docs.rs](https://docs.rs/dae-parser/badge.svg)](https://docs.rs/dae-parser)
[![crates.io](https://img.shields.io/crates/v/dae-parser.svg)](https://crates.io/crates/dae-parser)
[![Download numbers](https://img.shields.io/crates/d/dae-parser.svg)](https://crates.io/crates/dae-parser)
[![Github CI](https://github.com/digama0/dae-parser/workflows/Continuous%20integration/badge.svg)](https://github.com/digama0/dae-parser/actions)
[![Minimum rustc version](https://img.shields.io/badge/rustc-1.61.0-lightgray.svg)](#rust-version-requirements)
# Collada parser
This is a parser for the Collada (`.dae`) format, used for interchange between 3D renderers
and games. Compared to the [`collada`](https://crates.io/crates/collada) crate,
this crate attempts to more directly represent the Collada data model, and it is also
significantly more complete. It supports both reading and writing.
## Usage
The main entry point is the [`Document`] type, which has a [`FromStr`] implementation to convert
literal strings / slices, or [`Document::from_file`] to read from a `.dae` file on disk.
Collada documents are parsed eagerly, validating everything according to the
[COLLADA schema](https://www.khronos.org/files/collada_spec_1_4.pdf).
Once parsed, the data structures (structs and enums) can be navigated directly,
as all the data structures are public, and reflect the XML schema closely.
This library implements only version 1.4.1 of the Collada spec, although it may be expanded
in the future. (Please open an issue or PR if you find anything missing from the spec,
or if you have a use case for a later version.)
```rust
use std::str::FromStr;
use dae_parser::*;
let dae_file = r##"
1970-01-01T00:00:00Z1970-01-01T00:00:00Z
3 1 0 1 5 2 3 4 1 1 4 5
"##;
let document = Document::from_str(dae_file).unwrap();
let cube = document.local_map::().unwrap().get_str("Cube-mesh").unwrap();
let sources_map = document.local_map::