Extracted Fragmenter from Document.Annotator.

This class is in general helpful for creating valid hierarchically
structured data (such as XML) in presence of overlapping
elements.