Search code examples
prettifygoogle-code-prettify

Displaying XML using google-code-prettify


I can't seem to get google prettify to work with basic XML: anyone got this to work, or can see what I am doing wrong: here is my code:

<html>
<head>
<meta charset="utf-8" />

<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?autoload=true&amp;skin=sunburst&amp;lang=xml"></script>

</head>

<body>
<h1>XML Output</h1>

<pre class="prettyprint" id="quine" style="border:4px solid #88c">

<Rest_appt_pull licenseKey="123" passWord="456" start="30-oct-2014 00:00:00" finish="31-oct-2014 23:59:59" p_method="event">
<timings>
<entry label="Read" 
time=".03" 
segment=".03" />
<entry label="Processing XML" 
time=".04" 
segment=".01" />
</timings>
</Rest_appt_pull>

</pre>

</body>
</html>

Any help would be gratefully appreciated


Solution

  • The root cause is html tag symbol.

    Change < to &lt;

    Change > to &gt;