private static Parser<string> Node(string tagName, Attribute attribute) => (from openTag in TagParser.OpenTag where openTag.Name == tagName where ((OpenTag)openTag).Attributes.Any(atr => atr.Key == attribute.Name && atr.Value == attribute.Value) from content in Item.Many() from closeTag in TagParser.CloseTag(openTag) select string.Join(string.Empty, content)).Token();
public static Parser<string> FindTag(Attribute attribute) => from dirt in Parse.AnyChar.Except(Node(attribute)).Many() from content in Node(attribute) select content;