added db hooks for xml