static IEnumerable<(string key, string value)> GetNodeAttributes(XmlReader reader) { for (int i = 0; i < reader.AttributeCount; i++) { reader.MoveToAttribute(i); yield return (reader.Name, reader.Value); } }