Class XmlCharacters

    • Field Detail

      • MASKS

        private static final char[] MASKS
        This implementation uses an array that captures for each character the XML classifications. An array is used because it is a fast way of looking up each character.
      • NCNAME_START_CHARACTER

        private static final int NCNAME_START_CHARACTER
        See Also:
        Constant Field Values
    • Constructor Detail

      • XmlCharacters

        private XmlCharacters()
    • Method Detail

      • isValidNameStart

        public static boolean isValidNameStart​(int c)
        Determine whether the supplied character is a valid first character in an XML Name. The first character in an XML name is more restrictive than the remaining characters.
        Parameters:
        c - the character
        Returns:
        true if the character is valid for an XML Name's first character
      • isValidNcNameStart

        public static boolean isValidNcNameStart​(int c)
        Determine whether the supplied character is a valid first character in an XML NCName. The first character in an XML NCName is more restrictive than the remaining characters.
        Parameters:
        c - the character
        Returns:
        true if the character is valid for an XML NCName's first character
      • isValidName

        public static boolean isValidName​(int c)
        Determine whether the supplied character is a valid non-first character in an XML Name. The first character in an XML name is more restrictive than the remaining characters.
        Parameters:
        c - the character
        Returns:
        true if the character is valid character in an XML Name
      • isValidNcName

        public static boolean isValidNcName​(int c)
        Determine whether the supplied character is a valid non-first character in an XML NCName. The first character in an XML NCName is more restrictive than the remaining characters.
        Parameters:
        c - the character
        Returns:
        true if the character is valid character in an XML NCName
      • isValidPubid

        public static boolean isValidPubid​(int c)
        Determine whether the supplied character is a valid character in an XML Pubid.
        Parameters:
        c - the character
        Returns:
        true if the character is valid character in an XML Pubid
      • isValid

        public static boolean isValid​(int c)
        Determine whether the supplied character is a valid character in XML.
        Parameters:
        c - the character
        Returns:
        true if the character is valid character in XML
      • isValidContent

        public static boolean isValidContent​(int c)
        Determine whether the supplied character is a valid character in XML content
        Parameters:
        c - the character
        Returns:
        true if the character is valid character in XML content
      • isValidSpace

        public static boolean isValidSpace​(int c)
        Determine whether the supplied character is a valid whitespace character in XML
        Parameters:
        c - the character
        Returns:
        true if the character is valid whitespace character in XML
      • isValidName

        public static boolean isValidName​(String name)
        Determine if the supplied name is a valid XML Name.
        Parameters:
        name - the string being checked
        Returns:
        true if the supplied name is indeed a valid XML Name, or false otherwise
      • isValidNcName

        public static boolean isValidNcName​(String name)
        Determine if the supplied name is a valid XML NCName.
        Parameters:
        name - the string being checked
        Returns:
        true if the supplied name is indeed a valid XML NCName, or false otherwise