code: public void transformTo(Result r) {
          if (source == null) {
              throw new IllegalStateException("source must not be null");
          }
          if (r == null) {
              throw new IllegalArgumentException("result must not be null");
          }
          try {
              TransformerFactory fac = factory;
              if (fac == null) {
                  fac = TransformerFactoryConfigurer.Default.configure(TransformerFactory.newInstance());
              }
              Transformer t;
              if (styleSheet != null) {
                  t = fac.newTransformer(styleSheet);
              } else {
                  t = fac.newTransformer();
              }
              if (uriResolver != null) {
                  t.setURIResolver(uriResolver);
              }
              if (errorListener != null) {
                  t.setErrorListener(errorListener);
              }
              t.setOutputProperties(output);
              for (Map.Entry<String, Object> ent : params.entrySet()) {
                  t.setParameter(ent.getKey(), ent.getValue());
              }
              t.transform(source, r);
          } catch (javax.xml.transform.TransformerConfigurationException e) {
              throw new ConfigurationException(e);
          } catch (javax.xml.transform.TransformerException e) {
              throw new XMLUnitException(e);
          }
      }
docs: Perform the transformation.
  
  @param r where to send the transformation result - must not be null
  @exception IllegalStateException if source is null
  @exception IllegalArgumentException if result is null
  @exception ConfigurationException if the TraX system isn't
  configured properly
  @exception XMLUnitException if the transformation throws an
  exception