Class AttrSelector

  • All Implemented Interfaces:
    Serializable

    public class AttrSelector
    extends Selector
    An attribute selector matches document nodes based on their attributes. http://www.w3.org/TR/css3-selectors/#attribute-selectors Typically written as '[foo=bar]'.
    Author:
    nhant01, GeorgeLuo
    See Also:
    Serialized Form
    • Constructor Detail

      • AttrSelector

        public AttrSelector​(@Nonnull
                            String namespacePrefix,
                            @Nonnull
                            String attrName,
                            @Nonnull
                            String matchOperator,
                            @Nonnull
                            String value)
        Parameters:
        namespacePrefix - namespace prefix
        attrName - attribute name
        matchOperator - is either the string representation of the match operator (e.g., '=' or '~=') or '', in which case the attribute selector is a check for the presence of the attribute.
        value - is the value to apply the match operator against, or if matchOperator is '', then this must be empty as well.