title: Format XML data with JavaScript in one file
body: <p>I want to convert a single XML file into a human-readable format by JavaScript.  Here is why:</p>
  
  <ol>
  <li>Need to generate a human readable-document that is going to work everywhere. (Windows, Mac, Linux, iPhone, Android, Blackberry, etc.)</li>
  <li>The information is coming out of a C++ data structure that I have defined.</li>
  <li>Need to be able to include pictures.</li>
  <li>This document would be sent as an email attachment once created.</li>
  </ol>
  
  <p>I have looked into:</p>
  
  <ul>
  <li>XSLT: Can work as a single file, but only supported on the very newest mobile devices.</li>
  <li>CSS: I don't think the formatting is sophisticated enough to get what I need.</li>
  <li>PDF: Open source library would have to be included into environment. I would prefer not to do this if there is a good alternative.</li>
  </ul>
  
  <p>So that is why I am looking at JavaScript.  But the first question is, can JavaScript format/display XML data that exists in the same file?  If so, how?</p>