Skip to main content

strip_namespaces

Function strip_namespaces 

Source
pub fn strip_namespaces(xml: &str) -> String
Expand description

Strip namespace prefixes from XML content to simplify parsing.

UPnP XML often contains namespace prefixes like e:, dc:, upnp:, etc. This function removes these prefixes to simplify parsing with serde.

ยงExample

Input: <e:propertyset><dc:title>Song</dc:title></e:propertyset> Output: <propertyset><title>Song</title></propertyset>