Some improvement to xml