Ah, but how do you determine which element to get the outer HTML of
? Aziz, you might want to checkout Stack Overflow. This answer
in particular seems pretty solid to me.
Also, to answer your question about saveAsMHTML
; no, that's now what that method does. It saves the entire page, not a subset of the DOM tree.