com.levigo.jadice.document.metadata
Class MetadataUtil
java.lang.Object
com.levigo.jadice.document.metadata.MetadataUtil
public class MetadataUtil
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
stripInvalidXMLCharacters
public static String stripInvalidXMLCharacters(String s)
- This method ensures that the output String has only valid XML characters as specified by the
XML 1.0 standard.
- Parameters:
s
- The String whose non-valid characters we want to remove.
- Returns:
- The in String, stripped of non-valid characters. If s did not contain invalid
characters in the first place, a reference to s itself will be returned.
- See Also:
isValidXMLCharacter(char)
containsInvalidXMLCharacters
public static boolean containsInvalidXMLCharacters(String s)
- Return whether the given string contains any character that is not valid in an XML document.
- Parameters:
s
-
- Returns:
true
if there is at least one invalid character.- See Also:
isValidXMLCharacter(char)
isValidXMLCharacter
public static boolean isValidXMLCharacter(char c)
- Return whether the given character is a valid XML character. See Wikipedia or the standard for details.
- Parameters:
c
-
- Returns:
true
if the character is a valid XML character.