So I have a page with a table, and I am using AJAX to generate the table's content. The AJAX response returns XML with <tbody> and <tfoot> and all their underlying content... so all the JavaScript has to do is to append the <tbody> and <tfoot> from the XML response, as children to the <table> tag.

I do that, but for some reason, the <tbody> contents, which are two <tr>'s, come out as one row in the table.

Why would this happen? Shouldn't <tr>'s automatically come one under the other?

Thanks.