public static String getGridStrByMap(Map hashMap){
if(hashMap.isEmpty()){
return "";
}
StringBuffer strBuffer = new StringBuffer();
Iterator it = hashMap.keySet().iterator();
while (it.hasNext()){
String key = (String) it.next();
Object value = hashMap.get(key);
strBuffer.append("<" + key + "><![CDATA[" + (value == null ? "" : value) + "]]></" + key + ">\n");
}
return strBuffer.toString();
}
if(hashMap.isEmpty()){
return "";
}
StringBuffer strBuffer = new StringBuffer();
Iterator it = hashMap.keySet().iterator();
while (it.hasNext()){
String key = (String) it.next();
Object value = hashMap.get(key);
strBuffer.append("<" + key + "><![CDATA[" + (value == null ? "" : value) + "]]></" + key + ">\n");
}
return strBuffer.toString();
}