org.thymeleaf.templateparser
Interface ITemplateParser

All Known Implementing Classes:
AbstractHtmlTemplateParser, AbstractNonValidatingDOMTemplateParser, AbstractNonValidatingSAXTemplateParser, AbstractValidatingDOMTemplateParser, AbstractValidatingSAXTemplateParser, LegacyHtml5TemplateParser, XhtmlAndHtml5NonValidatingDOMTemplateParser, XhtmlAndHtml5NonValidatingSAXTemplateParser, XhtmlValidatingDOMTemplateParser, XhtmlValidatingSAXTemplateParser, XmlNonValidatingDOMTemplateParser, XmlNonValidatingSAXTemplateParser, XmlValidatingDOMTemplateParser, XmlValidatingSAXTemplateParser

public interface ITemplateParser

Common interface for template parsers, in charge of reading and converting a resolved template into a DOM tree.

All implementations of this interface must be thread-safe.

Since:
2.0.0
Author:
Daniel Fernández, Guven Demir

Method Summary
 java.util.List<Node> parseFragment(Configuration configuration, String fragment)
           Parses the document fragment contained in the given String object.
 Document parseTemplate(Configuration configuration, String documentName, java.io.Reader source)
           Parses the document contained in the given Reader object.
 

Method Detail

parseTemplate

Document parseTemplate(Configuration configuration,
                       String documentName,
                       java.io.Reader source)

Parses the document contained in the given Reader object.

Parameters:
configuration - the Configuration object
documentName - the document name (optional).
source - the Reader on the document to be parsed (required).
Returns:
the parsed Document.

parseFragment

java.util.List<Node> parseFragment(Configuration configuration,
                                   String fragment)

Parses the document fragment contained in the given String object.

Parameters:
configuration - the Configuration object
fragment - the String containing the fragment
Returns:
the resulting list of nodes.


Copyright © 2012 The THYMELEAF team. All Rights Reserved.