org.mixer2.util
Class XMLStringUtil

java.lang.Object
  extended by org.mixer2.util.XMLStringUtil

public class XMLStringUtil
extends Object


Method Summary
static String getXMLValidString(String input)
          Replace XML invalid chars with one white space.
static String getXMLValidString(String input, boolean replace, char replacement)
          Remove or replace XML invalid chars from input.
static boolean isXMLValid(char c)
           Checker for XML valid character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getXMLValidString

public static String getXMLValidString(String input)
Replace XML invalid chars with one white space.

Parameters:
input -
Returns:

getXMLValidString

public static String getXMLValidString(String input,
                                       boolean replace,
                                       char replacement)
Remove or replace XML invalid chars from input.

Parameters:
input -
replace - Whether or not to replace invalid characters by replacement
replacement - The character to replace any invalid character found
Returns:
The String that is cleaned from the invalid in XML characters.
See Also:
isXMLValid(char)

isXMLValid

public static boolean isXMLValid(char c)

Checker for XML valid character.

The Valid XML char is one of:
#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

Parameters:
c - The char to test.
Returns:
true if c is one of:
#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD].
See Also:
http://www.w3.org/TR/REC-xml/#charsets


Copyright © 2016 Project Mixer2. All rights reserved.