If duplicate elements exist in the XML then add them to an array to prevent ovewriting.