public static String toXml(Map<String, String> params) {
		StringBuilder xml = new StringBuilder();
		xml.append("<xml>");
		for (Entry<String, String> entry : params.entrySet()) {
			String key = entry.getKey();
			String value = entry.getValue();
			// 略过空值
			if (StrKit.isBlank(value))
				continue;
			xml.append("<").append(key).append(">");
			xml.append(entry.getValue());
			xml.append("</").append(key).append(">");
		}
		xml.append("</xml>");
		return xml.toString();
	}
public static String toXml ( Map < String , String > params ) { StringBuilder xml = new StringBuilder ( ) ; xml . append ( "<xml>" ) ; for ( Entry < String , String > entry : params . entrySet ( ) ) { String key = entry . getKey ( ) ; String value = entry . getValue ( ) ; if ( StrKit . isBlank ( value ) ) continue ; xml . append ( "<" ) . append ( key ) . append ( ">" ) ; xml . append ( entry . getValue ( ) ) ; xml . append ( "</" ) . append ( key ) . append ( ">" ) ; } xml . append ( "</xml>" ) ; return xml . toString ( ) ; }
微信下单map to xml

@param params
参数
@return {String}