[XML-SIG] syncing DOM trees
felix at fbreuer.de
Thu Jul 17 23:19:56 EDT 2003
Is there a way to keep two (or more) DOM trees in sync?
Scenario 1) I simply have two identical DOM trees in memory. When one of
them changes I want the change to be applied to the other tree as well.
Of course I could catch mutation events and handle them by appropriately
modifying the target tree. Has this been done before somewhere?
Scenario 2) I have two identical DOM trees *on two different machines*
connected via a network. Is there some canonical way (protocol) to
communicate the changes made to the first one accross a network so that
they can be applied to the second one? Is there an implementation of
such a protocol? I know there is http://www.deltaxml.com, but is there a
Scenario 3) I have a single DOM tree which I can easily reproduce
(because I have the XML file in serialized form). Now this DOM tree is
changed and I want to log these changes. At some point I want to
recreate the DOM tree from the file and apply a part of the logged
mutations to it. (So as to implement an "Undo" function.) How to do
this? It would be optimal of course to literally undo the last changes
applied to the modified tree - is there a canonical mapping of DOM
methods to their inverse?
Opinions, pointers, comments?
More information about the XML-SIG