Package de.uplanet.xml
Class XmlCharacterClasses
java.lang.Object
de.uplanet.xml.XmlCharacterClasses
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntPredicateThis predicate is the negation ofLEGAL_XML_CP.static final IntPredicateThis predicate acceptslegal XML charactersgiven as codepoints. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisLegalXmlCharacter(int p_iCodepoint) Check if the given codepoint represents a legal XML character as defined in the Char production in Extensible Markup Language (XML) 1.0 (Fifth Edition) Specification.static booleanisLegalXmlCharacterSequence(CharSequence p_chseq) static booleanisLegalXmlCharacterSequence(CharSequence p_chseq, int p_iBeginIndex, int p_iEndIndex) static booleanisNameCharacter(char p_ch) Check if the given character is a name character as defined in the Name production in Extensible Markup Language (XML) 1.0 Specification.static booleanisNameStartCharacter(char p_ch) Check if the given character is a name start character as defined in the Name production in Extensible Markup Language (XML) 1.0 Specification.static booleanisNcNameCharacter(char p_ch) Check if the given character is a name character as defined in the NcName production in Namespaces in XML 1.0 (Second Edition) Specification.static booleanisNcNameStartCharacter(char p_ch) Check if the given character is a name start character as defined in the NcName production in Namespaces in XML 1.0 (Second Edition) Specification.
-
Field Details
-
LEGAL_XML_CP
This predicate acceptslegal XML charactersgiven as codepoints. -
ILLEGAL_XML_CP
This predicate is the negation ofLEGAL_XML_CP.
-
-
Method Details
-
isNameStartCharacter
public static boolean isNameStartCharacter(char p_ch) Check if the given character is a name start character as defined in the Name production in Extensible Markup Language (XML) 1.0 Specification.Note: For performance reasons some checks for exotic characters are left out.
- Parameters:
p_ch- The character.- Returns:
trueif the given character is a name start character, orfalseotherwise.
-
isNameCharacter
public static boolean isNameCharacter(char p_ch) Check if the given character is a name character as defined in the Name production in Extensible Markup Language (XML) 1.0 Specification.Note: For performance reasons some checks for exotic characters are left out.
- Parameters:
p_ch- The character.- Returns:
trueif the given character is a name character, orfalseotherwise.
-
isNcNameStartCharacter
public static boolean isNcNameStartCharacter(char p_ch) Check if the given character is a name start character as defined in the NcName production in Namespaces in XML 1.0 (Second Edition) Specification.Note: For performance reasons some checks for exotic characters are left out.
- Parameters:
p_ch- The character.- Returns:
trueif the given character is a NcName start character, orfalseotherwise.
-
isNcNameCharacter
public static boolean isNcNameCharacter(char p_ch) Check if the given character is a name character as defined in the NcName production in Namespaces in XML 1.0 (Second Edition) Specification.Note: For performance reasons some checks for exotic characters are left out.
- Parameters:
p_ch- The character.- Returns:
trueif the given character is a NcName character, orfalseotherwise.
-
isLegalXmlCharacter
public static boolean isLegalXmlCharacter(int p_iCodepoint) Check if the given codepoint represents a legal XML character as defined in the Char production in Extensible Markup Language (XML) 1.0 (Fifth Edition) Specification.Character Range [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
- Parameters:
p_iCodepoint- The codepoint to check.- Returns:
trueif the given codepoint represents a legal XML character, orfalseotherwise.
-
isLegalXmlCharacterSequence
-
isLegalXmlCharacterSequence
public static boolean isLegalXmlCharacterSequence(CharSequence p_chseq, int p_iBeginIndex, int p_iEndIndex)
-