title: How can I display XML in a browser with preserved whitespace / preformatted text?
body: <p>I'm hoping to create a simple xml language for formatting reports I have to write, something along the lines of</p>
  
  <pre><code>&lt;?xml-stylesheet href="./report.css"?&gt;    
  &lt;report&gt;
  &lt;title&gt;A Tale of Two Cities&lt;/title&gt;
  &lt;author&gt;Charles Dickens&lt;/author&gt;
  &lt;code&gt;
  int main (int argc, char **argv)
  {       
      int x = 5;
  }
  &lt;/code&gt;
  &lt;/report&gt;
  </code></pre>
  
  <p>Where <code>report.css</code> looks like</p>
  
  <pre><code>title { 
      font-family: serif;
      background: white; 
      color: #003 
  }
  
  author { 
      font-size: large;
      margin: 1em 0 
  }
  
  code { 
      font-style: italic 
  }
  </code></pre>
  
  <p>etc. Problem is, I really need to keep the whitespace in some of the tags, like <code>code</code>. In html the <code>&lt;pre&gt;</code> tag does this, but I can't find any analog for xml, and my browser throws out all the whitespace when it renders the xml file. <code>&lt;code xml:space="preserve"&gt;</code> does not fix the problem (as I understand it, because this is not a text-only node). Is there any hope for getting a browser to display this correctly (after which I can just print it to pdf)? Or otherwise generating a nice-looking report? Or should I just switch to LaTeX? </p>