[stringtemplate-interest] best way to expose xml in template
Terence Parr
parrt at cs.usfca.edu
Tue Nov 28 17:29:27 PST 2006
On Nov 14, 2006, at 3:09 PM, Nate wrote:
> My application gets all of its data from a server as XML. What is a
> good
> way to expose this data to my StringTemplate templates? I could use a
> parser such as XOM, stuff the data into Lists or Maps and then push
> those into the templates as attributes. Are there other solutions?
Send in an object that implements the Map interface. In this way you
can ask for some named data. Would be very very sure that you have no
side effects in the map implementation of get().
Ter
More information about the stringtemplate-interest
mailing list