I have an XML file with many tags that carry the same info, but are required by a service I'm trying to use.
<request>
<first>{firstName}</first>
<first_1>{firstName}</first_1>
<first_2>{firstName</first_2>
</request>
In order to save time, I just want to be able to load the XML file and override all values in curly braces with the matching variable name such that:
val firstName = Bob
val myXML = XML.loadFile("path_to_file")
// TODO: myXML.override("firstName", firstName)
Would yield the XML:
<request>
<first>Bob</first>
<first_1>Bob</first_1>
<first_2>Bob</first_2>
</request>
Any thoughts on how to do this?