private static String fromMap(Map<?, ?> map) throws Exception {
        String json = "";
        log.debug(String.format("method start Map[map:%s]", map));
        if (map != null && map.size() > 0) {
            StringBuilder sb = new StringBuilder(map.size() * 20); //假设20是一个键值对的平均长度
            String name;
            Object value;
            for (Object key : map.keySet()) {
                name = key.toString().trim();
                value = map.get(key);
                sb.append('<').append(name).append('>')
                    .append(fromObject(value))
                    .append("</").append(name).append('>');
            }
            json = sb.toString();
        } 
        log.debug(String.format("method stop return:String[%s]", json));
        return json;
    }