I'm a bit unclear on your question (specifically I need HTML5
)
If you want the string representation this will create a string of the html for each node in the list
var html = Array.prototype.reduce.call(nodes, function(html, node) {
return html + ( node.outerHTML || node.nodeValue );
}, "");
Update: fix textnodes showing up as undefined
Try placing this in console on this site
var htmlstr = Array.prototype.reduce.call($("div")[43].childNodes, function(html, node) {
return html + ( node.outerHTML || node.nodeValue );
}, "");
console.log(htmlstr);