Class ParseSettings


  • public class ParseSettings
    extends java.lang.Object
    Controls parser settings, to optionally preserve tag and/or attribute name case.
    • Constructor Summary

      Constructors 
      Constructor Description
      ParseSettings​(boolean tag, boolean attribute)
      Define parse settings.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String normalizeAttribute​(java.lang.String name)
      Normalizes an attribute according to the case preservation setting.
      (package private) Attributes normalizeAttributes​(Attributes attributes)  
      java.lang.String normalizeTag​(java.lang.String name)
      Normalizes a tag name according to the case preservation setting.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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.
      • preserveTagCase

        private final boolean preserveTagCase
      • preserveAttributeCase

        private final boolean preserveAttributeCase
    • Constructor Detail

      • ParseSettings

        public ParseSettings​(boolean tag,
                             boolean attribute)
        Define parse settings.
        Parameters:
        tag - preserve tag case?
        attribute - preserve attribute name case?
    • Method Detail

      • normalizeTag

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

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