OutputStream output = new FileOutputStream("demopage.html");
JellyContext context = new JellyContext();
context.setVariable("name", "Tim O'Brien");
context.setVariable("background", "blue");
context.setVariable("url", "http://www.google.com");
context.setVariable("hobbies", new Vector());
XMLOutput xmlOutput = XMLOutput.createXMLOutput(output);
context.runScript(getClass().getResource("template.xml"), xmlOutput);
xmlOutput.flush();