refactorings in XmlTree