Thyme Leaf

Thymeleaf is a Java library. It is an XML / XHTML / HTML5 template engine (extensible to other formats) that can work both in web and non-web environments. It is better suited for serving XHTML/HTML5 at the view layer of web applications, but it can process any XML file even in offline environments.

<div class="line number1 index0 alt2"><code class="html plain">&lt;</code><code class="html keyword">table</code><code class="html plain">&gt;</code></div>
<div class="line number2 index1 alt1"><code class="html spaces">  </code><code class="html plain">&lt;</code><code class="html keyword">thead</code><code class="html plain">&gt;</code></div>
<div class="line number3 index2 alt2"><code class="html spaces">    </code><code class="html plain">&lt;</code><code class="html keyword">tr</code><code class="html plain">&gt;</code></div>
<div class="line number4 index3 alt1"><code class="html spaces">      </code><code class="html plain">&lt;</code><code class="html keyword">th</code> <code class="html color1">th:text</code><code class="html plain">=</code><code class="html string">"#{msgs.headers.name}"</code><code class="html plain">&gt;Name&lt;/</code><code class="html keyword">th</code><code class="html plain">&gt;</code></div>
<div class="line number5 index4 alt2"><code class="html spaces">      </code><code class="html plain">&lt;</code><code class="html keyword">th</code> <code class="html color1">th:text</code><code class="html plain">=</code><code class="html string">"#{msgs.headers.price}"</code><code class="html plain">&gt;Price&lt;/</code><code class="html keyword">th</code><code class="html plain">&gt;</code></div>
<div class="line number6 index5 alt1"><code class="html spaces">    </code><code class="html plain">&lt;/</code><code class="html keyword">tr</code><code class="html plain">&gt;</code></div>
<div class="line number7 index6 alt2"><code class="html spaces">  </code><code class="html plain">&lt;/</code><code class="html keyword">thead</code><code class="html plain">&gt;</code></div>
<div class="line number8 index7 alt1"><code class="html spaces">  </code><code class="html plain">&lt;</code><code class="html keyword">tbody</code><code class="html plain">&gt;</code></div>
<div class="line number9 index8 alt2"><code class="html spaces">    </code><code class="html plain">&lt;</code><code class="html keyword">tr</code> <code class="html color1">th:each</code><code class="html plain">=</code><code class="html string">"prod : ${allProducts}"</code><code class="html plain">&gt;</code></div>
<div class="line number10 index9 alt1"><code class="html spaces">      </code><code class="html plain">&lt;</code><code class="html keyword">td</code> <code class="html color1">th:text</code><code class="html plain">=</code><code class="html string">"${prod.name}"</code><code class="html plain">&gt;Oranges&lt;/</code><code class="html keyword">td</code><code class="html plain">&gt;</code></div>
<div class="line number11 index10 alt2"><code class="html spaces">      </code><code class="html plain">&lt;</code><code class="html keyword">td</code> <code class="html color1">th:text</code><code class="html plain">=</code><code class="html string">"${#numbers.formatDecimal(prod.price,1,2)}"</code><code class="html plain">&gt;0.99&lt;/</code><code class="html keyword">td</code><code class="html plain">&gt;</code></div>
<div class="line number12 index11 alt1"><code class="html spaces">    </code><code class="html plain">&lt;/</code><code class="html keyword">tr</code><code class="html plain">&gt;</code></div>
<div class="line number13 index12 alt2"><code class="html spaces">  </code><code class="html plain">&lt;/</code><code class="html keyword">tbody</code><code class="html plain">&gt;</code></div>
<div class="line number14 index13 alt1"><code class="html plain">&lt;/</code><code class="html keyword">table</code><code class="html plain">&gt;</code></div>