Class RtzReader
Reads RTZ route plans (versions 1.0, 1.1 and 1.2) into an RtzRoute.
public static class RtzReader
- Inheritance
-
RtzReader
- Inherited Members
Remarks
The reader is lenient where the data allows: elements are matched in the
root's RTZ namespace, both schedule element spellings
(sheduleElement, scheduleElement) and both window forms
(xsd:time, xsd:duration) are accepted in every version, and
an attribute whose value can't be parsed is kept as an extra attribute
rather than failing the file. Only a file that isn't an RTZ route, or a
waypoint without a position or id, is an error.
The defaultWaypoint is read as it is; it isn't applied to the
waypoints (see GetEffectiveLeg(int)).
Methods
Read(Stream)
Reads an RTZ route from stream.
public static RtzRoute Read(Stream stream)
Parameters
streamStreamThe stream; left open.
Returns
- RtzRoute
The route.
Exceptions
- RtzFormatException
The content isn't an RTZ route.
Read(string)
Reads the RTZ file at path.
public static RtzRoute Read(string path)
Parameters
pathstringThe file.
Returns
- RtzRoute
The route.
Exceptions
- RtzFormatException
The file isn't an RTZ route.
Read(XDocument)
Reads an RTZ route from a loaded document.
public static RtzRoute Read(XDocument document)
Parameters
documentXDocumentThe document.
Returns
- RtzRoute
The route.
Exceptions
- RtzFormatException
The document isn't an RTZ route.