Skip to main content

parse

Function parse 

Source
pub fn parse<T: DeserializeOwned>(xml: &str) -> Result<T>
Expand description

Parse XML string into a deserializable type with namespace stripping.

This function handles the common case of parsing UPnP XML that contains namespace prefixes. It strips namespace prefixes before parsing to allow simpler serde struct definitions.

§Arguments

  • xml - The XML string to parse

§Returns

The parsed value of type T, or an error if parsing fails.