But then another thread may update the tree while I'm in toXML?