xml: Track changes to xml trees as they happen