var count = 0;
function newElement()
{
var elem = document.createElement('foo:bar');
var text = document.createTextNode('Node ' + ++count);
elem.appendChild(text);
document.lastChild.appendChild(elem);
}
function deleteElement()
{
if (document.lastChild.lastChild) {
document.lastChild.removeChild(document.lastChild.lastChild);
}
}