I've read this a few times, and I'm not entirely sure what you're asking for, Ben. Can you clarify a bit? It looks like there's some malformed HTML in the first snippet, and incomplete HTML in the second.
Basically I want to replace the first half of the document, without concern for HTML elements or depth etc. Basically split the string in half and replace the first half with new HTML.
I've read this a few times, and I'm not entirely sure what you're asking for, Ben. Can you clarify a bit? It looks like there's some malformed HTML in the first snippet, and incomplete HTML in the second.
Basically I want to replace the first half of the document, without concern for HTML elements or depth etc. Basically split the string in half and replace the first half with new HTML.
For some reason seems like a bad idea :)