code: function (str, cb) {
      var self = this;
  
      xml2js.parseString(str, function (err, result) {
        if (err) {
          cb(err);
          return;
        }
  
        var foundSchemas = traverseFindSchemas(result);
        cb(null, foundSchemas);
      });
    }
docs: Does not search recursively inside schemas for imported other schemas, so there might still be types missing when parsing, even if you satisfy all found schemas. You have to inspect pending imports returned in a callback of addSchema (or downloadAndAddSchema) and satisfy those schemas as well.