13. A non-transitory computer readable medium storing computer program instructions for real-time document sharing and editing, which, when executed on a processor, cause the processor to perform operations comprising: recording a count of one or more tags being traversed to reach a position of a cursor of a user editing a copy of a document; recording a position of the cursor; receiving an update to the copy of the document from a server; generating an updated copy of the document; using the position of the cursor and the count of the one or more tags to determine an updated position of the cursor in the updated copy of the document; recording one or more types of the one or more tags being traversed to reach the position of the cursor; and displaying to the user the updated copy of the document with the cursor displayed at the updated position.
13. A non-transitory computer readable medium storing computer program instructions for real-time document sharing and editing, which, when executed on a processor, cause the processor to perform operations comprising: recording a count of one or more tags being traversed to reach a position of a cursor of a user editing a copy of a document; recording a position of the cursor; receiving an update to the copy of the document from a server; generating an updated copy of the document; using the position of the cursor and the count of the one or more tags to determine an updated position of the cursor in the updated copy of the document; recording one or more types of the one or more tags being traversed to reach the position of the cursor; and displaying to the user the updated copy of the document with the cursor displayed at the updated position. 15. The non-transitory computer readable medium of claim 13 , wherein the receiving is in response to a request for changes sent to the server.