If you are using jQuery, why don't you use it's benefits?
adding elements:
$("
").appendTo(root);
removing all elements:
$(root).empty();
deleting one element:
$("li:eq(3)",$(root)).remove();
and if you are using raw js, you can use:
document.getElementById("root").innerHTML = "";