应用于xml、json和条带化字符串
//*
*字符串格式处理(实现换行和空格处的字符串换行功能) ) ) ) ) ) ) ) ) ) )。
* @param xml
*/
隐私保护转换器(stringxmlorjson )。
if(xmlorjson==null||''.equals )|'null'.equals({
返回' ';
}
//处理字符串
String[] beforechar={ '、'、'、'、'、'、')、' %、%%、%、%、%、%、%%、%、% };
String[] afterchar={ ',',',',',',',',',',
()、)、)、)、)、)、)、)、)、)、)、)、)、)、)。
for(intI=0; i beforechar.length; I ) {
xmlorjson=xmlorjson.replace all (before char [ I ],afterchar[i] );
}
xmlorjson=xmlorjson.replace all ('n ','');
xmlorjson=xmlorjson.replaceAll (','');
xmlorjson=xmlorjson.replace all ((t ),) );
返回xmlorjson;
}