That example above shows how to use Velocity to take in a template XML file and merge your data into it to output a populated XML file. If I want to output an XML file with dynamic data by using some kind of template tags in an XML file, is Velocity the best choice out there?
Basically, if I have a template file with stuff like
in it, do you recommend Velocity for populating it?
If the format of the files is fixed in this way, sure, why not. Just make sure that Velocity (and/or your code) handles setting the encoding correctly. As an alternative, you could check out FreeMarker, which is the other widely used templating tool.