ofXml refactoring

related to #2311