When invoking the Jenkins rest api for Freestyle jobs, the response began returning a BOM appended to the beginning:
ï»¿<?xml version="1.0" encoding="UTF-8"?>
This is causing malformed XML.
I know this script was working in my last known jenkins ver : 1.627
Also, interestingly enough, this seems to only be a problem with freestyle jobs, retrieving the config.xml for my Maven jobs return normal XML data.