public abstract class AbstractHtmlTemplateParser extends Object implements ITemplateParser
Document parser implementation for non-XML HTML documents.
Modifier | Constructor and Description |
---|---|
protected |
AbstractHtmlTemplateParser(String templateModeName,
int poolSize) |
Modifier and Type | Method and Description |
---|---|
protected TemplatePreprocessingReader |
getTemplatePreprocessingReader(Reader reader) |
List<Node> |
parseFragment(Configuration configuration,
String fragment)
Parses the document fragment contained in the given String object.
|
Document |
parseTemplate(Configuration configuration,
String documentName,
Reader reader)
Parses the document contained in the given Reader object.
|
protected boolean |
shouldAddThymeleafRootToParser() |
protected abstract List<Node> |
unwrapFragment(Document document) |
protected abstract String |
wrapFragment(String fragment) |
protected AbstractHtmlTemplateParser(String templateModeName, int poolSize)
public final Document parseTemplate(Configuration configuration, String documentName, Reader reader)
ITemplateParser
Parses the document contained in the given Reader object.
parseTemplate
in interface ITemplateParser
configuration
- the Configuration objectdocumentName
- the document name (optional).reader
- the Reader on the document to be parsed (required).public final List<Node> parseFragment(Configuration configuration, String fragment)
ITemplateParser
Parses the document fragment contained in the given String object.
parseFragment
in interface ITemplateParser
configuration
- the Configuration objectfragment
- the String containing the fragmentprotected boolean shouldAddThymeleafRootToParser()
protected TemplatePreprocessingReader getTemplatePreprocessingReader(Reader reader)
reader
- readerCopyright © 2014 The THYMELEAF team. All rights reserved.