ParseMessageXml method
Parses the message XML.
The reader.
Implementation
/* private */
void ParseMessageXml(EwsXmlReader reader) {
// E12 and E14 return the MessageXml element in different
// namespaces (types namespace for E12, errors namespace in E14). To
// avoid this problem, the parser will match the namespace from the
// start and end elements.
XmlNamespace elementNS =
EwsUtilities.GetNamespaceFromUri(reader.NamespaceUri);
if (!reader.IsEmptyElement) {
do {
reader.Read();
if (reader.IsStartElement() && !reader.IsEmptyElement) {
switch (reader.LocalName) {
case XmlElementNames.Value:
this.errorDetails[
reader.ReadAttributeValue(XmlAttributeNames.Name)] =
reader.ReadElementValue<String>();
break;
default:
break;
}
}
} while (!reader.IsEndElementWithNamespace(
elementNS, XmlElementNames.MessageXml));
}
}