pub fn response_from_str<'a, T>(input: &'a str) -> Result<T>
where T: Deserialize<'a>,
Expand description

Parses the body of an xmlrpc http request and attempts to convert it to the desired type.

let val: String = serde_xmlrpc::response_from_str(
r#"<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
 <params>
   <param><value><string>hello world</string></value></param>
 </params>
</methodResponse>"#).unwrap();

assert_eq!(val, "hello world".to_string());