Ejemplo n.º 1
0
        /// <summary>
        /// Remove elements from this list that match the <see cref="Selector"/> query.
        /// E.g. HTML: <code>&lt;div class=logo&gt;One&lt;/div&gt; &lt;div&gt;Two&lt;/div&gt;</code>
        /// <code>Elements divs = doc.Select("div").Not("#logo");</code>
        /// Result: <code>divs: [&lt;div&gt;Two&lt;/div&gt;]</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));
        }
Ejemplo n.º 2
0
        // filters

        /// <summary>
        /// Find matching elements within this element list.
        /// </summary>
        /// <param name="query">A <see cref="Selector"/> query</param>
        /// <returns>the filtered list of elements, or an empty list if none match.</returns>
        public Elements Select(string query)
        {
            return(Selector.Select(query, this));
        }