parsing & building xml