I am trying to show a string containing xml data in xml format, on a jsp page. I do not want to parse the xml but just want to show on the browser xml data.
Would someone be able to help me out with this?
I am trying to show a string containing xml data in xml format, on a jsp page. I do not want to parse the xml but just want to show on the browser xml data.
Would someone be able to help me out with this?
<pre>
<c:out value="${xmlString}" />
</pre>
This will pretty print the xml
<c:out value="${theXmlString}"/>
If you want to preserve line breaks, use a pre tag:
<pre><c:out value="${theXmlString}"/></pre>