I've been pondering on the same front. Here's my progress so far.
The JavaScript attribute document.documentElement.outerHTML can be accessed in some browsers, e.g. Safari and Chrome, but not in Firefox. This will show you the result of DOM manipulations but won't give you quite the full source code for the page. If you inject some JavaScript that will store the value of document.documentElement.outerHTML after your DOM manipulation has been carried out, you should be able to get Selenium to type that value into the "direct input" textarea of the W3C Validator and submit it. You'd need to prepend and append the value appropriately in order to make it a valid (X)HTML document. I haven't managed to get all these steps working yet from Selenium.
prepending "view-source:" to the URL (as done here) works in some browsers, e.g. Firefox and Chrome, but not in Safari. It won't show you the result of DOM manipulations. I can't seem to get Selenium IDE to open an address beginning with "view-source:" however; it always prepends a forward slash, and I'm not sure how to avoid that.
I'd be interested to know which other approaches people have tried, and whether they've had any success!