I use Google Code Prettify to syntax highlight my code. This is my HTML
<head>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
</head>
<body>
<div id ="xmlView">
<pre class="prettyprint">
<code class="language-xml" id="xmlTextArea"></code>
</pre>
</div>
</body>
When adding Code directly in HTML to xmlTextArea and replacing all < and > with > and < it does it's job, but not when setting the code with jquery like this:
$('#xmlTextArea').text(code)
I also tried to call PR.prettyPrint()
afterwards