mua
update function   var t = function getTemplateParamFromXml(tmplXml, paramName) {
      paramName = paramName.
        trim().
        replace('-', '\\-');

      var re = new RegExp('<part><name>\\s*' + paramName + '\\s*<\/name>=<value>([^>]+)<\/value>'),
        matches = tmplXml.match(re);

      return matches && matches[1].trim() || false;
    };