Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Map;

public class Main {
    public static String assignDynamicValues(String inputXML, Map<String, String> dynamicValues) {
        for (String key : dynamicValues.keySet()) {
            if (inputXML.contains("{" + key + "}")) {
                inputXML = inputXML.replaceAll("\\{" + key + "\\}", dynamicValues.get(key));
            }
        }
        return inputXML;
    }
}