Displaying < and > in browser
I am using XSL to generate HTML, however, there is one section of the page where I need to render XML in the browser. The output needs to be:
<div class="body">
<pre>
<Author>Poe</Author>
</pre>
</div>
The Input is:
<root>
<Author>Poe</Author>
<Book>Title</Book>
</root>
What I was trying:
<div class="body">
<xsl:variable name="entry"><xsl:copy-of select="Author"/></xsl:variable>
<pre>
<xsl:copy-of select="$entry"/>
</pre>
There will be a much larger unknown data set that needs to display, but for now I would settle with <Author>.
I did notice that this post is very similar to a previous post, however, I am unable to use the posted solution as the node structure of the elements to be displayed in the browsers is unknown.
|