Class CssSelectorParser

java.lang.Object
com.itextpdf.styledxmlparser.css.parse.CssSelectorParser

public final class CssSelectorParser extends Object
Utility class for parsing CSS selectors.
  • Method Details

    • parseCommaSeparatedSelectors

      public static List<ICssSelector> parseCommaSeparatedSelectors (String arguments)
      Parses a comma-separated list of CSS selectors from a string and returns a list of ICssSelector objects that represent the selectors.
      Parameters:
      arguments - the string containing a comma-separated list of CSS selectors
      Returns:
      a list of ICssSelector objects representing the parsed selectors
    • parseSelectorItems

      public static List<ICssSelectorItem> parseSelectorItems (String selector)
      Parses the given CSS selector string into a list of ICssSelectorItem objects. This method processes the selector string character by character, handling state transitions and escape sequences to generate a structured representation of the selector components.
      Parameters:
      selector - the CSS selector string to be parsed
      Returns:
      a list of ICssSelectorItem objects representing the components of the parsed selector