| java.lang.Object de.anomic.data.htmlTools
htmlTools | public class htmlTools (Code) | | |
Method Summary | |
public static String | decodeHtml2Unicode(String text) | public static String | encode(String text, String[] map, int spos, int epos) Generic method that replaces occurences of special character entities defined in map
array with their corresponding mapping.
Parameters: text - The String too process. Parameters: map - An array defining the entity mapping. Parameters: spos - It is possible to use a subset of the map only. | public static String | encodeUnicode2html(String text, boolean includingAmpersand, boolean forXML) Replaces characters in a string with other entities according to HTML standards.
Parameters: text - a string that possibly contains special characters Parameters: includingAmpersand - if false ampersands are not encoded Parameters: forXML - if true then only &, ", < and > willbe transcoded. | public static String | encodeUnicode2html(String text, boolean includingAmpersand) | public static String | encodeUnicode2xml(String text) Replaces special entities ampersand, quotation marks, and less than/graiter than
by the escaping entities allowed in XML documents. | public static void | main(String[] args) |
encode | public static String encode(String text, String[] map, int spos, int epos)(Code) | | Generic method that replaces occurences of special character entities defined in map
array with their corresponding mapping.
Parameters: text - The String too process. Parameters: map - An array defining the entity mapping. Parameters: spos - It is possible to use a subset of the map only. This parameter defines thestarting point in the map array. Parameters: epos - The ending point, see above. A copy of the original String with all entities defined in map replaced. |
encodeUnicode2html | public static String encodeUnicode2html(String text, boolean includingAmpersand, boolean forXML)(Code) | | Replaces characters in a string with other entities according to HTML standards.
Parameters: text - a string that possibly contains special characters Parameters: includingAmpersand - if false ampersands are not encoded Parameters: forXML - if true then only &, ", < and > willbe transcoded. the string with all characters replaced by the corresponding character from array |
encodeUnicode2xml | public static String encodeUnicode2xml(String text)(Code) | | Replaces special entities ampersand, quotation marks, and less than/graiter than
by the escaping entities allowed in XML documents.
Like
htmlTools.encodeUnicode2html(String,boolean,boolean) with
includingAmpersand = true and foxXML = true .
Parameters: text - the original String the encoded String |
|
|