Added code to persist the xml elements to the database