nxml-mode, first customize
t. Then normal Emacs commands like
kill-sexp will work on elements, not just start or end tags.
"|<div class='foo'> This is some text. </div>" (where the | illustrates the cursor position), doing
C-M-d C-M-k C-M-u C-M-k <p C-c C-i C-y M-y will replace the div with a paragraph. That's quite easy to record as a keyboard macro, although of course it'll only ever replace the tag after point with a paragraph; if you want more flexibility you'll have to write a function that prompts for the new tag to insert first.