我想使用FreeMarker处理XML模板。但是,我不想让FreeMarker将输出写入Writer,而是要遍历经过处理的DOM树。 (本质上,我想从中填充一个Protobuf3结构。)
有可能吗?
答案 0 :(得分:0)
FreeMarker is not imposing any kind of DOM-like structure on the template — unlike Thymeleaf.
So, it is not possible to automatically get a DOM, but the output has to be parsed into a DOM afterwards.