changed XML processing to ElementTree
Fixed xml header