Example usage for org.jdom2.output SAXOutputter SAXOutputter

List of usage examples for org.jdom2.output SAXOutputter SAXOutputter

Introduction

In this page you can find the example usage for org.jdom2.output SAXOutputter SAXOutputter.

Prototype

public SAXOutputter(ContentHandler contentHandler) 

Source Link

Document

This will create a SAXOutputter with the specified ContentHandler.

Usage

From source file:org.culturegraph.mf.jdom.JDomDocumentToStream.java

License:Apache License

public JDomDocumentToStream(final XmlPipe<StreamReceiver> xmlPipe) {
    this.xmlPipe = xmlPipe;
    saxOutputer = new SAXOutputter(xmlPipe);
}

From source file:org.mycore.common.xml.MCRXSLTransformation.java

License:Open Source License

/**
 * Method transform. Transforms a JDOM-Document to the given OutputStream
 * //from www  .  ja  va  2 s .  com
 */
public void transform(org.jdom2.Document in, TransformerHandler handler, OutputStream out) {
    handler.setResult(new StreamResult(out));

    try {
        new SAXOutputter(handler).output(in);
    } catch (JDOMException ex) {
        LOGGER.error("Error while transforming an XML document with an XSL stylesheet.");
    }
}