added db support based on xml api