Package org.jsoup.parser

Class ParseSettings


public class ParseSettings extends Object
Controls parser case settings, to optionally preserve tag and/or attribute name case.
  • Field Details

    • htmlDefault

      public static final ParseSettings htmlDefault
      HTML default settings: both tag and attribute names are lower-cased during parsing.
    • preserveCase

      public static final ParseSettings preserveCase
      Preserve both tag and attribute case.
  • Constructor Details

    • ParseSettings

      public ParseSettings(boolean tag, boolean attribute)
      Define parse settings.
      tag - preserve tag case?
      attribute - preserve attribute name case?
  • Method Details

    • preserveTagCase

      public boolean preserveTagCase()
      Returns true if preserving tag name case.
    • preserveAttributeCase

      public boolean preserveAttributeCase()
      Returns true if preserving attribute case.
    • normalizeTag

      public String normalizeTag(String name)
      Normalizes a tag name according to the case preservation setting.
    • normalizeAttribute

      public String normalizeAttribute(String name)
      Normalizes an attribute according to the case preservation setting.