xpath-reader
Provides a convenient API to read from XML using XPath queries.
This crate is mostly a wrapper around the crate sxd_xpath.
Examples
use ;
let xml = r#"<?xml version="1.0"?><book xmlns="books" name="Neuromancer" author="William Gibson"><tags><tag name="cyberpunk"/><tag name="sci-fi"/></tags></book>"#;
let mut context = new;
context.set_namespace;
let reader = new.unwrap;
let name: String = reader.read.unwrap;
assert_eq!;
let publisher: = reader.read_option.unwrap;
let author: = reader.read_option.unwrap;
assert_eq!;
assert_eq!;
let tags: = reader.read_vec.unwrap;
assert_eq!;