Selective Serialization

Selective Serialization is the capability of Parsoid is to compare an original and edited DOM, determine what has changed, and use the original source wikitext for the unmodified regions of the DOM.

Originally, Parsoid relied on special change markers supplied by an HTML5-based editor (like Extension:VisualEditor for MediaWiki) to determine what needs to be serialized and what could simply be copied over. In modern Parsoid the change markers are generated internally by comparing DOM trees.

The current implementation can be found in the mediawiki/services/parsoid project on the Wikimedia Git repository browser.