SkipElement method

Future<void> SkipElement(
  1. String namespacePrefix,
  2. String localName
)
Skips the element. The namespace prefix. Name of the local.

Implementation

Future<void> SkipElement(String namespacePrefix, String localName) async {
  if (!this.IsEndElement(namespacePrefix, localName)) {
    if (!this.IsStartElementWithPrefix(namespacePrefix, localName)) {
      await this.ReadStartElement(namespacePrefix, localName);
    }

    if (!this.IsEmptyElement) {
      do {
        await this.Read();
      } while (!this.IsEndElement(namespacePrefix, localName));
    }
  }
}