System.out.println("template : " + template);
// Use the template to create a transformer
TransformerFactory transFact = TransformerFactory.newInstance();
SAXTransformerFactory saxTransFact = (SAXTransformerFactory) transFact;
// create a ContentHandler
TransformerHandler transHand = saxTransFact
.newTransformerHandler(template);
transHand.setResult(new SAXResult(consumer));
return transHand;