appending multiple groups with values from xml
<p>In my xml file comments are listed as</p>

<pre><code>&lt;Comments&gt; 
&lt;CommentID id="1"&gt;
&lt;CommentBy&gt;efet&lt;/CommentBy&gt;
&lt;CommentDesc&gt;   Who cares!!! My boyfriend thinks the same with me. tell your friends. 
&lt;/CommentDesc&gt;
&lt;/CommentID&gt;
&lt;CommentID id="2"&gt;
&lt;CommentBy&gt;tetto&lt;/CommentBy&gt;
&lt;CommentDesc&gt;   xyz.... &lt;/CommentDesc&gt;
&lt;/CommentID&gt;
&lt;/Comments&gt;
</code></pre>

<p>I need to append them inside the ul of the div id="nw-comments".</p>

<pre><code>&lt;div id="nw-comments" class="article-page"&gt;
    &lt;h3&gt;Member Comments&lt;/h3&gt;
    &lt;ul&gt;
        &lt;li class="top-level"&gt;
            &lt;ul class="comment-options right"&gt;
                &lt;li&gt;
                &lt;a id="reply_1272195" class="reply" href="javascript:void(0);" name="anchor_1272195"&gt;Reply&lt;/a&gt;
                &lt;/li&gt;
                &lt;li class="last"&gt;
                &lt;a id="report_1272195" class="report" href="javascript:void(0);"&gt;Report Abuse&lt;/a&gt;
                &lt;/li&gt;
            &lt;/ul&gt;
            &lt;h6&gt;Posted By: [CommentBy] @ [CommentDateEntered]&lt;/h6&gt;
            &lt;div class="post-content"&gt;
                &lt;p&gt;[CommentDesc]&lt;/p&gt;
            &lt;/div&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;  
</code></pre>

<p>I tried to do it with the following code but I keep getting errors.</p>

<pre><code>$(document).ready(function(){
    $.ajax({
        dataType: "xml",
        url: "/FLPM/content/news/news.cs.asp?Process=ViewNews&amp;NEWSID=&lt;%=Request.QueryString("NEWSID")%&gt;",
        success: function(xml) {
            $(xml).find('row').each(function(){
                var id = $(this).attr('id');
                var FullName = $(this).find('FullName').text();
                var CommentBy = $(this).find('CommentBy').text();
                var CommentDateEntered = $(this).find('CommentDateEntered').text();
                var CommentDesc = $(this).find('CommentDesc').text();
                $("#nw-comments ul").append("&lt;h6&gt;Posted By: " + CommentBy + " @ " + CommentDateEntered + "&lt;/h6&gt;&lt;div class=""post-content""&gt;&lt;p&gt;" + CommentDesc + "&lt;/p&gt;&lt;/div&gt;");

            });
        }
    });
</code></pre>
