read xml or json from text file, transform to cinergi and write out to text file