Creating xml with java and file recovery, transforming it into an object