Java tutorial
//package com.java2s; import java.util.Map; public class Main { public static String createXml(Map<String, Object> map) { StringBuffer sb = new StringBuffer(); for (String key : map.keySet()) { sb.append("<").append(key).append(">"); sb.append(map.get(key)); sb.append("</").append(key).append(">"); } return sb.toString(); } }