Skip to main content

parse_file

Function parse_file 

Source
pub fn parse_file<P: AsRef<Path>>(path: P) -> Result<OpenScenario>
Expand description

Parse an OpenSCENARIO file from the filesystem

This is a convenience function that wraps parser::xml::parse_from_file with additional context and error handling.

ยงExample

use openscenario_rs::parse_file;

let scenario = parse_file("examples/highway.xosc")?;