title: Pretty print XML data in JSP
body: <p>How do I pretty print (ie. with indentation) XML data in the JSP? I have the following code:</p>
  
  <pre><code>&lt;c:forEach items="${stuffs}" var="stuff"&gt;
      &lt;pre&gt;
          &lt;c:out value="${stuff}" escapeXml="true"/&gt;&lt;br/&gt;
      &lt;/pre&gt;
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>But the problem is when <code>${stuff}</code> is an unformatted XML, it will show in the jsp as one long XML data. I need it pretty-printed inside the <code>&lt;p&gt;</code> tag.</p>