Managed to create object from xml