I want to be able to select chunks of HTML. For example, how can I select the block of HTML that's part of <sup id="21"> using XPath or CSS? Assume that in the real HTML the section with ******** does not exist.

I want to split the HTML by <sup id=*> but the problem is that the nodes are siblings.