xml.decode = function decodeXML(str) {
  if (!utilities.isString(str)) return undefined;

  return str.replace(/'/g, "'")
    .replace(/"/g, '"')