List of utility methods to do XML String Create
String | toXML(String s) to XML return s.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">"); |
String | toXML(String string) to XML if (string != null) { string = string.replace("&", "&"); string = string.replace("\"", """); string = string.replace("'", "'"); string = string.replace("<", "<"); string = string.replace(">", ">"); return string; ... |
String | toXML(String valor) to XML StringBuffer str = new StringBuffer(); for (int i = 0; i < valor.length(); ++i) str.append(toXML(valor.charAt(i))); return str.toString(); |
String | toXMLString(final boolean[] array) Return an XML encoding String representation of a boolean array.
final StringBuffer sb = new StringBuffer(SIZE); final int length = array.length; final int lastItem = length - 1; for (int i = 0; i < length; i++) { sb.append(array[i]); if (i != lastItem) { sb.append(SPACE); return (sb.toString()); |
String | toXmlString(float value) to Xml String if (Float.isNaN(value)) { return "NaN"; } else if (value == Float.POSITIVE_INFINITY) { return "INF"; } else if (value == Float.NEGATIVE_INFINITY) { return "-INF"; } else { return Float.toString(value); ... |
String | toXMLString(String in) Do character conversions to convert a string to an XML parsable string StringBuffer sb = new StringBuffer(in.length() + 100); for (int i = 0; i < in.length(); i++) { char c = in.charAt(i); switch (c) { case '\"': sb.append("""); break; case '&': ... |
String | toXMLString(String javaString) to XML String char[] charArray = javaString.toCharArray(); StringBuilder buffer = new StringBuilder(); for (int i = 0; i < charArray.length; i++) { final char ch = charArray[i]; switch (ch) { case ' ': buffer.append(' '); break; ... |
String | toXMLString(String org) to XML String if (org == null) return ""; StringBuffer result = new StringBuffer(org.length()); char[] chars = org.toCharArray(); for (int i = 0; i < chars.length; i++) { if (chars[i] == '<') result.append("<"); else if (chars[i] == '>') ... |
String | toXmlString(String s) to Xml String return toXmlString(s, Empty);
|
String | toXMLString(String str) to XML String return str.replaceAll("&", "&").replaceAll("\"", """).replaceAll(">", ">").replaceAll("<", "<"); |