pub fn detect_version(xml: &str) -> Result<FlexSchemaVersion>Expand description
Detect FLEX schema version from XML
Examines the XML to identify the FLEX schema version attribute. If no version is specified or cannot be detected, defaults to V3.
§Arguments
xml- XML string from IB FLEX query
§Returns
Ok(FlexSchemaVersion)- Detected schema version (or Unknown if undetectable)
§Errors
Returns ParseError if the XML cannot be parsed or is malformed.
§Example
use ib_flex::version::detect_version;
let xml = r#"<FlexQueryResponse queryName="test" type="AF" version="3">"#;
let version = detect_version(xml).unwrap();