Ejemplo n.º 1
0
  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();
  }
Ejemplo n.º 2
0
  public static StringToStringMap fromXml(String value) {
    if (value == null || value.trim().length() == 0 || value.equals("<xml-fragment/>"))
      return new StringToStringMap();

    try {
      StringToStringMapConfig nsMapping = StringToStringMapConfig.Factory.parse(value);

      return fromXml(nsMapping);
    } catch (Exception e) {
      SoapUI.logError(e);
    }

    return new StringToStringMap();
  }