title: Why am I getting invalide XML from JSON?
body: <p>Here is my code (json is a String):   </p>
  
  <pre><code>String xml = XML.toString(new JSONObject(json));
  </code></pre>
  
  <p>JSON: </p>
  
  <pre><code>{
      "components": {
          "header": "generic",
          "body": "generic",
          "footer": "watchlist"
      },
      "featuredArticle": {
          "title": "Test title",
          "text": "test text."
      },
      "header": {
          "ref": ""
      },
      "body": {
          "ref": ""
      },
      "footer": {
          "ref": ""
      }
  }
  </code></pre>
  
  <p>XML: </p>
  
  <pre><code>&lt;components&gt;
      &lt;footer&gt;watchlist&lt;/footer&gt;
      &lt;header&gt;generic&lt;/header&gt;
      &lt;body&gt;generic&lt;/body&gt;
  &lt;/components&gt;
  &lt;footer&gt;
      &lt;ref /&gt;
  &lt;/footer&gt;
  &lt;header&gt;
      &lt;ref /&gt;
  &lt;/header&gt;
  &lt;featuredArticle&gt;
      &lt;text&gt;test text.&lt;/text&gt;
      &lt;title&gt;Test title&lt;/title&gt;
  &lt;/featuredArticle&gt;
  &lt;body&gt;
      &lt;ref /&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>When I validate the JSON in text mate it passes, but the XML does not. </p>