/// <summary> /// Test if any of the matched elements match the supplied query. /// </summary> /// <param name="query">A selector</param> /// <returns>true if at least one element in the list matches the query.</returns> public bool Is(string query) { Elements children = Select(query); return(!children.IsEmpty); }
/// <summary> /// Remove elements from this list that match the <see cref="Selector"/> query. /// E.g. HTML: <code><div class=logo>One</div> <div>Two</div></code> /// <code>Elements divs = doc.Select("div").Not("#logo");</code> /// Result: <code>divs: [<div>Two</div>]</code> /// </summary> /// <param name="query">query the selector query whose results should be removed from these elements</param> /// <returns>a new elements list that contains only the filtered results</returns> public Elements Not(string query) { Elements output = Selector.Select(query, this); return(Selector.FilterOut(this, output)); }