Extracted from the Xerces implementation This class defines the basic XML character properties. The data in this class can be used to verify that a character is a valid XML character or if the character is a space, name start, or name character.
A series of convenience methods are supplied to ease the burden of the developer. Because inlining the checks can improve per character performance, the tables of character properties are public. Using the character as an index into the CHARS
array and applying the appropriate mask flag (e.g. MASK_VALID
), yields the same results as calling the convenience methods. There is one exception: check the comments for the isValid
method for details.
@author Glenn Marcy, IBM
@author Andy Clark, IBM
@author Eric Ye, IBM
@author Arnaud Le Hors, IBM
@author Michael Glavassevich, IBM
@author Rahul Srivastava, Sun Microsystems Inc.
@version $Id: XMLChar.java,v 1.16 2004/03/25 04:03:22 mrglavas Exp $