InternalReadElementWithNamespace method

Future<void> InternalReadElementWithNamespace(
  1. XmlNamespace xmlNamespace,
  2. String? localName,
  3. XmlNodeType nodeType
)
Read XML element. The XML namespace. Name of the local. Type of the node.

Implementation

/* private */
Future<void> InternalReadElementWithNamespace(XmlNamespace xmlNamespace,
    String? localName, XmlNodeType nodeType) async {
  if (xmlNamespace == XmlNamespace.NotSpecified) {
    await this._InternalReadElement("", localName, nodeType);
  } else {
    await this.Read(nodeType: nodeType);

    if ((this.LocalName != localName) ||
        (this.NamespaceUri != EwsUtilities.GetNamespaceUri(xmlNamespace))) {
      print("---- ${this.NamespaceUri}");
      throw new ServiceXmlDeserializationException("""string.Format(
                          Strings.UnexpectedElement,
                          ${EwsUtilities.GetNamespacePrefix(xmlNamespace)},
                          $localName,
                          $nodeType,
                          ${this._xmlReader.Name},
                          ${this.NodeType})""");
    }
  }
}