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.
      java.lang.String normalizeTag​(java.lang.String name)
      Normalizes a tag name according to the case preservation setting.
      boolean preserveAttributeCase()
      Returns true if preserving attribute case.
      boolean preserveTagCase()
      Returns true if preserving tag name case.
      • 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.
    • Constructor Detail

      • ParseSettings

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

      • preserveTagCase

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

        public boolean preserveAttributeCase()
        Returns true if preserving attribute case.
      • 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.