code: public void marshal(File file, final List<RouteDefinition> routeDefinitionList) throws Exception {
          marshal(file, new Model2Model() {
              @Override
              public XmlModel transform(XmlModel model) {
                  copyRoutesToElement(routeDefinitionList, model.getContextElement());
                  return model;
              }
          });
      }
docs: Loads the given file then updates the route definitions from the given list then stores the file again