xml parsing written in main