c++ program for main.xml