public static StringToStringMap fromXml(StringToStringMapConfig nsMapping) { StringToStringMap result = new StringToStringMap(); for (Entry entry : nsMapping.getEntryList()) { result.put(entry.getKey(), entry.getValue()); } return result; }
public String toXml() { StringToStringMapConfig xmlConfig = StringToStringMapConfig.Factory.newInstance(); for (String key : keySet()) { Entry entry = xmlConfig.addNewEntry(); entry.setKey(key); entry.setValue(get(key)); } return xmlConfig.toString(); }