List of usage examples for org.dom4j.io SAXWriter SAXWriter
public SAXWriter()
From source file:org.dentaku.gentaku.cartridge.event.WerkflowTag.java
License:Apache License
public void doTag(XMLOutput xmlOutput) throws MissingAttributeException, JellyTagException { if (metadataClass == null) { throw new MissingAttributeException("missing metadata attribute"); }/* ww w.j a va 2 s . c om*/ try { Document doc = generateDocument(metadataClass); SAXWriter writer = new SAXWriter(); ContentHandler ctxHandler = new WerkflowContentHandler(xmlOutput); writer.setContentHandler(ctxHandler); writer.write(doc); } catch (Exception e) { throw new JellyTagException(e); } }