Append a <div> in jQuery
<p>When I'm using this code:</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function() {

$.ajax({
type: "GET",
url: "nyhederlang.xml",
dataType: "xml",
success: parseXml,
error: function(){alert("Error: Something went wrong");}
 });
 });

 function parseXml(xml)
 {
 //print the title and the description
 $(xml).find("article").each(function()
 {
 $("#output").append("&lt;div&gt;");
  $("#output").append("&lt;b&gt;" + $(this).find("title").text() + ":&lt;/b&gt; &lt;br /&gt;");
  $("#output").append($(this).find("paragraphs").text());
   $("#output").append("&lt;/div&gt;");
  });
  }
  &lt;/script&gt;
</code></pre>

<p>I get both div and /div in the beginning of #output.</p>

<p>Why isn't /div placed at the end of #output?</p>

<p>This is what it looks like:</p>

<pre><code>&lt;div id="output"&gt;
&lt;div&gt;&lt;/div&gt;
&lt;b&gt;Some title text&lt;/b&gt;
.
.
.
.
.
</code></pre>
