supporting yui nodes and doc elements as well