title: C# or javascript code formatter
body: <p>I'm currently using <a href="http://code.google.com/p/syntaxhighlighter/" rel="nofollow noreferrer">Syntax Highlighter</a> to show a XML or SOAP messages on a page.  That works fine for messages that are already formatted correctly (line breaks, indents, etc).  But if I had a XML string like:</p>
  
  <pre><code>string xml = "&lt;doc&gt;&lt;object&gt;&lt;first&gt;Joe&lt;/first&gt;&lt;last&gt;Smith&lt;/last&gt;&lt;/object&gt;&lt;/doc&gt;";
  </code></pre>
  
  <p>I would write the string to the page and the javascript highlighter would correctly syntax highlight the string, but it would be all on a single line.</p>
  
  <p>Is there a C# string formatter or some syntax highlighting library that has a "smart" indent feature that would insert line breaks, indents, etc... ?</p>