ReadElementsFromXml method
Reads response elements from XML.
The reader.
Implementation
@override
Future<void> ReadElementsFromXml(EwsServiceXmlReader reader) async {
await super.ReadElementsFromXml(reader);
await reader.Read();
if (reader.LocalName == XmlElementNames.Notifications) {
// Exchange sends either Notifications or ConnectionStatus. Other servers
// such as grommunio send Notifications (possibly empty),
// ErrorSubscriptionIds and ConnectionStatus together.
if (!reader.IsEmptyElement) {
await _results.LoadFromXml(reader);
}
await reader.Read();
if (reader.IsStartElementWithNamespace(
XmlNamespace.Messages,
XmlElementNames.ErrorSubscriptionIds,
)) {
if (!reader.IsEmptyElement) {
await reader.SkipCurrentElement();
}
await reader.Read();
}
if (reader.IsStartElementWithNamespace(
XmlNamespace.Messages,
XmlElementNames.ConnectionStatus,
)) {
await _ReadConnectionStatus(reader);
}
} else if (reader.LocalName == XmlElementNames.ConnectionStatus) {
await _ReadConnectionStatus(reader);
}
}