Before you call parse(), can you append a closing form tag? If you know where it's supposed to be, you could use a regex, or you could just say:
$tree->parse($req->content . '</form>');
Low tech, but sometimes it's enough.
Hmmm, that will probably work. I guess I will actually have
to append '</form>' before the closing '</body>' and '</html>'
tags, but that should not be too hard to do. Thank you very much.
--Mike