Added content for xml build function and added classes for db objects