I am trying to create a simple XML-Template which so far only consists of:
<?xml version="1.0"?>
I read the file like this:
STGroup group = new STGroupDir("templates");
ST st = group.getInstanceOf("report");
st.add("analysis", ana);
String result = st.render();
System.out.println(result);
And the result is several error messages:
report.st 1:1: invalid character '<'
report.st 1:1: invalid character '?'
report.st 1:19: invalid character '?'
report.st 1:20: invalid character '>'
report.st 1:2: no viable alternative at input 'xml'
I have seen other people reading HTML tempaltes that also use tags. So what am I doing wrong?