• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about Freemarker Template  RSS feed

 
Fred Victa
Ranch Hand
Posts: 206
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to create an XML document using a Freemarker template. How would I create the following XML aggregate multiple times in a single XML document? The number of times this XML aggregate appears in the XML document is supposed to be based upon how many people there are. If there are five people, then this XML aggregate is supposed to appear five times. If there are ten people, then this XML aggregate is supposed to appear ten times and so on and so on.

<PersonInfo>
<FirstName>Some name</FirstName>
<LastName>Some last name</LastName>
<Address>some address</Address>
<Phone>000-000-0000</Phone>
</PersonInfo>


 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16059
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at the manual for Freemarker. You can use list in the template for repeating blocks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!