load xml to dict and dump dict to xml in python