Skip to content

XmlParseError

Defined in: xml.rs:30

Available on crate feature alloc only.

pub enum XmlParseError {
MissingElement(&'static str),
InvalidValue { key: &'static str, value: alloc::string::String },
InvalidEpoch(alloc::string::String),
Unsupported(UnsupportedMetadata),
UnsupportedMarkup(&'static str),
InvalidElements(ElementsError),
MultipleMessages { found: usize },
RepeatedElement(&'static str),
MalformedDocument(alloc::string::String),
UnsupportedMessage(alloc::string::String),
}

Error type for OMM XML parsing.

MissingElement(&‘static str)

A required element was absent.


key: &‘static str value: alloc::string::String

An element’s text could not be parsed as the expected number.


InvalidEpoch(alloc::string::String)

EPOCH was not a parseable ISO-8601 UTC timestamp (calendar or ordinal / day-of-year form).


Unsupported(UnsupportedMetadata)

A metadata element declares something this crate cannot read (non-Earth center, non-TEME frame, non-UTC time system, non-SGP4 theory).


UnsupportedMarkup(&‘static str)

The document uses a markup declaration this reader does not interpret: a DOCTYPE (whose internal subset can define entities) or a CDATA section. Both can carry text that looks like an element, so a reader that scans for tag names must not read past them.


InvalidElements(ElementsError)

The parsed values are not a valid element set (e.g. non-positive mean motion or out-of-range eccentricity).


found: usize

The document holds more than one <omm>, as an NDM that collects several OMMs does (CelesTrak’s group queries return one).


RepeatedElement(&‘static str)

An element this reads or checks appears more than once in the OMM.


MalformedDocument(alloc::string::String)

The document does not hold together (see parse_all): a tag is left open, closed out of order, or unterminated, or text or markup lies outside the root element or between the messages of an NDM.


UnsupportedMessage(alloc::string::String)

An NDM holds a message other than an OMM (an OPM, OEM, …), which this does not read.