GenericValue dataResource = delegator.findByPrimaryKeyCache("DataResource", UtilMisc.toMap("dataResourceId", dataResourceId));
GenericValue templateDataResource = delegator.findByPrimaryKeyCache("DataResource", UtilMisc.toMap("dataResourceId", templateDataResourceId));
if ("FTL".equals(templateDataResource.getString("dataTemplateTypeId"))) {
StringReader sr = new StringReader(textData);
try {
NodeModel nodeModel = NodeModel.parse(new InputSource(sr));
templateContext.put("doc", nodeModel) ;
} catch (SAXException e) {
throw new GeneralException(e.getMessage());
} catch (ParserConfigurationException e2) {
throw new GeneralException(e2.getMessage());