How do I find the PARENT div in free-form XHTML string, given any insertion point, such as the following
<DIV> <-- this is the DIV I want0>
<DIV>Not interested in this one</DIV>
<DIV> Not this one either</DIV>
<P>Here's my insertion point - I got to start here and work out who my parent DIV is</P>
<DIV>Not this one either</DIV>
I've been trying to use http://simplehtmldom.sourceforge.net/
but I can't figure out how to use it for this particular operation.
I then tried direct string manipulation, but that was a mess.