so i have this XMl
<a>blah</a>
And i want to change it to
<a>someValueIDoNotKnowAtCompileTime</a>
Currently, I am looking at this SO question . However, this just changes the value to "2"
What i want is exactly the same thing, but to be able to define the value (so that it can change at runtime - i am reading the values from a file!)
I tried passing the value into the overridden methods, but that didn't work - compile errors everywhere (obviously)
How can i change static xml with dynamic values?
ADDING CODE
var splitString = someString.split("/t") //where someString is a line from a file
val action = splitString(0)
val ref = splitString(1)
xmlMap.get(action) match { //maps the "action" string to some XML
case Some(entry) => {
val xmlToSend = insertRefIntoXml(ref,entry)
//for the different XML, i want to put the string "ref" in an appropriate place
}
...