Class XMLChecker
java.lang.Object
org.znerd.xmlenc.XMLChecker
Utility class that provides XML checking functionality.
- Since:
- xmlenc 0.41
- Version:
- $Revision: 1.11 $ $Date: 2005/09/12 08:40:02 $
- Author:
- Ernst de Haan (wfe.dehaan@gmail.com)
-
Method Summary
Modifier and TypeMethodDescriptionstatic final voidcheckName(char[] ch, int start, int length) Checks if the specified part of a character array matches the Name production.static final voidChecks if the specified string matches the Name production.static final voidcheckPubidLiteral(char[] ch, int start, int length) Checks if the specified part of a character array matches the PubidLiteral production.static final voidChecks if the specified string matches the PubidLiteral production.static final voidcheckS(char[] ch, int start, int length) Checks if the specified part of a character array matches the S (white space) production.static final voidChecks if the specified string matches the S (white space) production.static final voidcheckSystemLiteral(char[] ch, int start, int length) Checks if the specified part of a character array matches the SystemLiteral production.static final voidChecks if the specified string matches the SystemLiteral production.static final booleanDetermines if the specified string matches the Name production.static final booleanDetermines if the specified string matches the PubidLiteral production.static final booleanDetermines if the specified string matches the SystemLiteral production.
-
Method Details
-
checkS
Checks if the specified string matches the S (white space) production.See: Definition of S.
- Parameters:
s- the character string to check, cannot benull.- Throws:
NullPointerException- ifs == null.InvalidXMLException- if the specified character string does not match the S production.
-
checkS
public static final void checkS(char[] ch, int start, int length) throws NullPointerException, IndexOutOfBoundsException, InvalidXMLException Checks if the specified part of a character array matches the S (white space) production.See: Definition of S.
- Parameters:
ch- the character array that contains the characters to be checked, cannot benull.start- the start index intoch, must be >= 0.length- the number of characters to take fromch, starting at thestartindex.- Throws:
NullPointerException- ifch == null.IndexOutOfBoundsException- ifstart < 0 || start + length > ch.length.InvalidXMLException- if the specified character string does not match the S production.
-
isName
Determines if the specified string matches the Name production.See: Definition of Name.
- Parameters:
s- the character string to check, cannot benull.- Returns:
trueif theStringmatches the production, orfalseotherwise.- Throws:
NullPointerException- ifs == null.
-
checkName
Checks if the specified string matches the Name production.See: Definition of Name.
- Parameters:
s- the character string to check, cannot benull.- Throws:
NullPointerException- ifs == null.InvalidXMLException- if the specified character string does not match the Name production.
-
checkName
public static final void checkName(char[] ch, int start, int length) throws NullPointerException, IndexOutOfBoundsException, InvalidXMLException Checks if the specified part of a character array matches the Name production.See: Definition of Name.
- Parameters:
ch- the character array that contains the characters to be checked, cannot benull.start- the start index intoch, must be >= 0.length- the number of characters to take fromch, starting at thestartindex.- Throws:
NullPointerException- ifch == null.IndexOutOfBoundsException- ifstart < 0 || start + length > ch.length.InvalidXMLException- if the specified character string does not match the Name production.
-
isSystemLiteral
Determines if the specified string matches the SystemLiteral production.- Parameters:
s- the character string to check, cannot benull.- Returns:
trueif theStringmatches the production, orfalseotherwise.- Throws:
NullPointerException- ifs == null.
-
checkSystemLiteral
public static final void checkSystemLiteral(String s) throws NullPointerException, InvalidXMLException Checks if the specified string matches the SystemLiteral production.- Parameters:
s- the character string to check, cannot benull.- Throws:
NullPointerException- ifs == null.InvalidXMLException- if the specified character string does not match the PubidLiteral production.
-
checkSystemLiteral
public static final void checkSystemLiteral(char[] ch, int start, int length) throws NullPointerException, IndexOutOfBoundsException, InvalidXMLException Checks if the specified part of a character array matches the SystemLiteral production.- Parameters:
ch- the character array that contains the characters to be checked, cannot benull.start- the start index intoch, must be >= 0.length- the number of characters to take fromch, starting at thestartindex.- Throws:
NullPointerException- ifch == null.IndexOutOfBoundsException- ifstart < 0 || start + length > ch.length.InvalidXMLException- if the specified character string does not match the SystemLiteral production.
-
isPubidLiteral
Determines if the specified string matches the PubidLiteral production.- Parameters:
s- the character string to check, cannot benull.- Returns:
trueif theStringmatches the production, orfalseotherwise.- Throws:
NullPointerException- ifs == null.
-
checkPubidLiteral
public static final void checkPubidLiteral(String s) throws NullPointerException, InvalidXMLException Checks if the specified string matches the PubidLiteral production.- Parameters:
s- the character string to check, cannot benull.- Throws:
NullPointerException- ifs == null.InvalidXMLException- if the specified character string does not match the PubidLiteral production.
-
checkPubidLiteral
public static final void checkPubidLiteral(char[] ch, int start, int length) throws NullPointerException, IndexOutOfBoundsException, InvalidXMLException Checks if the specified part of a character array matches the PubidLiteral production.- Parameters:
ch- the character array that contains the characters to be checked, cannot benull.start- the start index intoch, must be >= 0.length- the number of characters to take fromch, starting at thestartindex.- Throws:
NullPointerException- ifch == null.IndexOutOfBoundsException- ifstart < 0 || start + length > ch.length.InvalidXMLException- if the specified character string does not match the PubidLiteral production.
-