Sometimes there may be a benefit to convert JDOM document to DOM model. For that purpose, JDOM contains a special implementation of serializer class named as DOMOutputter. In order to convert, we simply create new instance of this class and call its output method. It takes JDOM document and returns DOM-one. Sample below shows how this could be done:

 import org.jdom.Document;
import org.jdom.input.DOMBuilder;
import org.jdom.output.DOMOutputter;

 * This sample program showing how it is easy to convert
 * from to JDOM of DOM document.

public class Test {
    public static void main(String[] args) {
        try {
            // load the document from a file:
            DOMBuilder builder = new DOMBuilder(false);
            Document document ="sample.xml"));
            // create JDOM to DOM converter:
            DOMOutputter output = new DOMOutputter();
            // here we have a DOM-document:
            org.w3c.dom.Document dom = output.output(document);
        } catch (Exception ex) {