Package org.eclipse.lemminx.extensions.generators

## Class XMLChar

- java.lang.Object
- - org.eclipse.lemminx.extensions.generators.XMLChar

    public class XMLChar
    extends Object

This class is a copy/paste from some methods of Xerces org.apache.xerces.util.XMLChar.

### Field Summary

Fields
`static int` `MASK_CONTENT` Content character mask.
`static int` `MASK_NAME` Name character mask.
`static int` `MASK_NAME_START` Name start character mask.
`static int` `MASK_NCNAME` NCName character mask.
`static int` `MASK_NCNAME_START` NCName start character mask.
`static int` `MASK_PUBID` Pubid character mask.
`static int` `MASK_SPACE` Space character mask.
`static int` `MASK_VALID` Valid character mask.

### Constructor Summary

Constructors
`XMLChar()`

### Method Summary

All Methods Static Methods Concrete Methods
`static boolean` `isName​(int c)` Returns true if the specified character is a valid name character as defined by production [4] in the XML 1.0 specification.
`static boolean` `isNameStart​(int c)` Returns true if the specified character is a valid name start character as defined by production [5] in the XML 1.0 specification.
`static boolean` `isValidName​(String name)` Check to see if a string is a valid Name according to [5] in the XML 1.0 Recommendation
`static boolean` `isValidNmtoken​(String nmtoken)` Check to see if a string is a valid Nmtoken according to [7] in the XML 1.0 Recommendation

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### MASK_VALID

    public static final int MASK_VALID

Valid character mask.

See Also:
  Constant Field Values

#### MASK_SPACE

    public static final int MASK_SPACE

Space character mask.

See Also:
  Constant Field Values

#### MASK_NAME_START

    public static final int MASK_NAME_START

Name start character mask.

See Also:
  Constant Field Values

#### MASK_NAME

    public static final int MASK_NAME

Name character mask.

See Also:
  Constant Field Values

#### MASK_PUBID

    public static final int MASK_PUBID

Pubid character mask.

See Also:
  Constant Field Values

#### MASK_CONTENT

    public static final int MASK_CONTENT

Content character mask. Special characters are those that can be considered the start of markup, such as '<' and '&'. The various newline characters are considered special as well. All other valid XML characters can be considered content.

This is an optimization for the inner loop of character scanning.

See Also:
  Constant Field Values

#### MASK_NCNAME_START

    public static final int MASK_NCNAME_START

NCName start character mask.

See Also:
  Constant Field Values

#### MASK_NCNAME

    public static final int MASK_NCNAME

NCName character mask.

See Also:
  Constant Field Values

### Constructor Detail

#### XMLChar

    public XMLChar()

### Method Detail

#### isValidNmtoken

    public static boolean isValidNmtoken​(String nmtoken)

Check to see if a string is a valid Nmtoken according to [7] in the XML 1.0 Recommendation

Parameters:
  `nmtoken` - string to check
Returns:
  true if nmtoken is a valid Nmtoken

#### isValidName

    public static boolean isValidName​(String name)

Check to see if a string is a valid Name according to [5] in the XML 1.0 Recommendation

Parameters:
  `name` - string to check
Returns:
  true if name is a valid Name

#### isNameStart

    public static boolean isNameStart​(int c)

Returns true if the specified character is a valid name start character as defined by production [5] in the XML 1.0 specification.

Parameters:
  `c` - The character to check.

#### isName

    public static boolean isName​(int c)

Returns true if the specified character is a valid name character as defined by production [4] in the XML 1.0 specification.

Parameters:
  `c` - The character to check.