Skip to main content

detect_format

Function detect_format 

Source
pub fn detect_format(xml: &str) -> Option<Format>
Expand description

Detect the XML format by inspecting the root element name.

Uses quick-xml’s event reader to skip over XML declarations, comments, and whitespace, then matches on the first start element:

Returns None if the root element is not recognized.