Refactored readUnitMappings method in XMLReader