code: function isSCXMLValid(model){
          return new Promise(function(resolve, reject) {
              if(model === "") {
                  reject("Model is empty");
                  return;
              }
  
              validator.validateXML(model, __dirname + '/xmlSchemas/scxml.xsd', function(err, result) {
                  if (err) {
                      reject(err);
                      return;
                  }
                  resolve(result.valid);
              })
          });
      }
docs: Validates SCXML markup as a string
  @method isSCXMLValid
  @param {String} model A string with the SCXML document to validate
  @returns {Promise} True if the SCXML is valid false otherwise