xml writer and db writer