improved serialize html dom node index print (non-text-node index)