Suppose I have xml file with contents like this:
<example name={name}/>
Is it possible to load this file from Scala and have {name} replaced with the value of the name in scope?
So something like XML.loadFile, but that does databinding in the same way as Scala’s XML literal.
Note that more complex examples should work as well, e.g.
<example name={name}>
{for (hobby <- hobbies) yield <hobby>{hobby}</hobby>}
</example>
1 Answer