title: Thymeleaf migration to 3.0 (from 2.1)
body: <p>I am having issues porting some of my thymeleaf stuff from 2.1 to 3.0. Already gone through the tutorials, examples, existing questions in stackoverflow etc but couldn't find the alternate in new thymeleaf for this.</p>
  
  <p>How can I read my template from test/input.html file. Once read then I can play around with the Model using structurehandler i.e. reading/adding/setting attributes node variables etc.</p>
  
  <p>But issue is I am not able to read this small template code.</p>
  
  <p>In 2.1 I was using</p>
  
  <p>templateName is "test/input.html" file which has small fragment</p>
  
  <pre><code>  protected Document getTemplate(String templateName) {
      final Template template = argument.getTemplateRepository().getTemplate(new TemplateProcessingParameters(argument.getConfiguration(), templateName, context));
      return template.getDocument();
    }
  </code></pre>
  
  <p>Any help would be highly appreciated. Any direction or any method in IModel (as I believe this will be used in thymeleaf 3.0) which can read my html file?</p>
  
  <p>Updated:
  Document is being used in below mentioned method. This is in abstract class so kind of making the architecture of whole implementation.</p>
  
  <pre><code>  private NestableNode UsingDocument(NestableNode node) {
      final Element element = getElement();
      for (final Map.Entry&lt;String, Attribute&gt; attribute : element.getAttributeMap().entrySet()) {
        node.setNodeLocalVariable(PrefixUtils.getUnprefixed(attribute.getValue().getOriginalName()), attribute.getValue().getValue());
      }
  
      for (final String property : element.getNodePropertyNames()) {
        node.setNodeLocalVariable(property, element.getNodeProperty(property));
      }
  
      for (final Node child : element.getElementChildren()) {
        child.setProcessable(true);
      }
      node.setNodeLocalVariable("children", element.getElementChildren());
      node.setNodeProperty("children", element.getElementChildren());
  
      return node;
    }
  </code></pre>
  
  <p>Tried using th:replace by setting local variables but still not able to achieve exact same functionality and also then I have to update various number of html files.</p>