Is there an XSLT method to display an XML document in a web browser similar to Chrome, IE, and Firefox's document tree view (listing each element name and InnerText)? I am wanting a similar view functionality, but be able to apply certain styling to the InnerText values (primarily insert br tags). The XML template is fairly complex with many different parent and child elements, and it also includes comments but not attributes. Thank you.
So looking for:
<?xml version="1.0" encoding="utf-8">
<root>
<!--
Comment 1
Comment 1 Continued
-->
<parent1>
<child1>Child 1 InnerText</child1>
<child2>
Child 2 InnerText
Child 2 InnerText Continued
</child2>
</parent>
</root>
To be displayed in a web browser like:
<root>
<!--
Comment 1
Comment 1 Continued
-->
<parent1>
<child1>Child 1 InnerText</child1>
<child2>
Child 2 InnerText
Child 2 InnerText Continued
</child2>
</parent>
</root>
Instead of the web browser's default parser, which looks something like this (depending on the browser - IE below):
<?xml version="1.0" encoding="utf-8">
- <root>
<!-- Comment 1Comment 1 Continued -->
- <parent1>
<child1>Child 1 InnerText</child1>
<child2>Child 2 InnerTextChild 2 InnerText Continued</child2>
</parent>
</root>