Skip to main content

read

Function read 

Source
pub fn read(text: &str) -> Result<FlightLog, LogError>
Expand description

Reads a GPX file’s tracks into a flight record, its waypoints and routes as figures it states.

§Errors

LogError::Syntax if the XML isn’t well formed, declares a document type, refers to an entity XML doesn’t define, nests elements deeper than MAX_DEPTH or holds more than MAX_NODES nodes; if its version is missing, isn’t 1.0 or 1.1, or disagrees with its namespace; or if a point is refused (the module’s documentation lists why), naming the element and its line. LogError::NotThisFormat if its root element isn’t gpx, or is in a namespace that is neither GPX 1.0’s nor 1.1’s. LogError::NoData if it holds no track point.