Package com.epam.admintool
Class XMLHelper
java.lang.Object
com.epam.admintool.XMLHelper
Created with IntelliJ IDEA.
User: wed
Date: 21.11.12
Time: 14:41
To change this template use File | Settings | File Templates.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
protectSpecialCharacters
(String originalUnprotectedString) Returns the string where all non-ascii and <, &, > are encoded as numeric entities.static String
-
Method Details
-
protectSpecialCharacters
Returns the string where all non-ascii and <, &, > are encoded as numeric entities. I.e. "<A & B >" .... (insert result here). The result is safe to include anywhere in a text field in an XML-string. If there were no characters to protect, the original string is returned.- Parameters:
originalUnprotectedString
- original string which may contain characters either reserved in XML or with different representation in different encodings (like 8859-1 and UFT-8)- Returns:
-
restoreSpecialCharacters
-