More generic, now handles both XML and EDMX