StringTemplate: Loading a Template from disk?
Posted
by Amitabh
on Stack Overflow
See other posts from Stack Overflow
or by Amitabh
Published on 2010-06-11T15:40:15Z
Indexed on
2010/06/11
15:42 UTC
Read the original article
Hit count: 634
I am using StringTemplate in c# and following code to load a template from a subdirectory of my application.
StringTemplateGroup group = new StringTemplateGroup("myGroup", "/tmp");
StringTemplate query = group.GetInstanceOf("Sample");
query.SetAttribute("column", "name");
Console.WriteLine(query);
I have a template file Sample.st in the tmp directory of my application.
I am getting the following error.
Unhandled Exception: System.ArgumentException: Can't find template Sample.st; group hierarchy is [myGroup]
Does anyone know what is wrong here?
© Stack Overflow or respective owner