[−][src]Function libvplan::parser::parse
pub fn parse(input: &str) -> Result<Vplan, ParsingError>
Parses the given XML input into a vplan.
Example
ⓘThis example is not tested
extern crate libvplan; use libvplan::parser; use std::fs::File; use std::io::{BufReader, Read}; let file = match File::open("path/to/file.xml") { Ok(file) => file, Err(error) => panic!("{}", error) }; let mut reader = BufReader::new(file); let mut input = String::new(); reader.read_to_string(&mut input); match parser::parse(&input) { Ok(vplan) => println!("{:#?}", vplan), Err(error) => panic!("{}", error) }