$('li').html($(this).children())
You can try this, it should work. Clean and easy.
This should work.
$("li").contents().filter(function(){ return this.nodeType != 1; }).remove();
or by specifying text nodes explicitly
$("li").contents().filter(function(){ return this.nodeType == 3; }).remove();
See this fiddle.
$('li').not('div,a').text('')
Try this, untested
Edit
$('li').contents().filter(function(){ return !(this.tagName == 'DIV'
|| this.tagName == 'A');}).remove();