1. A method comprising performing a machine-executed operation involving instructions, wherein the machine-executed operation is at least one of: A) sending said instructions over transmission media; B) receiving said instructions over transmission media; C) storing said instructions onto a machine-readable storage medium; and D) executing the instructions; wherein said instructions are instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of: generating a plurality of node events based on an input document; generating one or more operation events based on an edit script, wherein the edit script specifies a set of operations to perform on the input document; applying the edit script to the input document by performing one or more operations, corresponding to one or more operation events, on one or more node events of the plurality of node events; and generating an output document that reflects the one or more operations.