less calculation in upgradeXMLTags