I\'ve created an XML editor and I\'m stuck at the last phase: adding undo/redo functionality.
I\'ve only got to add undo/redo for when users add elements, attributes
Take a look at the Command Pattern, its uses include implementing undo/redo functionality.