Rendering XML in readable format in HTML
Posted on 2006-03-31
we have CLOB objects in our database which contains XML data. We are reading this data and rendering our HTML pages with XSLT. Since the XML in this case is a data value, it comes encoded in our XML payload (< > instead of '<' and '>'). This is because we are using JAXB to handle the marshalling of our data objects and it encodes the data because it needs to produce well formed XML (at least that is what I am guessing)
So the question is - can I use XSLT to transform this encoded data so that I can put, at a minimum carriage returns before each tag?
What is happening currently is the HTML output is correct (<xsl:output method="html" indent="no"/>) but the XML is unreadable since we cannot enforce presentation - i.e. carriage returns and tabs