handling xml, some utils