Since JDOM represent an API building on standard parsing packages, we can select the way we want the document be loaded from a file.

In order to load a JDOM document via DOM we hav to you DOMBuilder class. One of its constructors receives a boolean value, which allows to defined if the document must be validates or not. Sample below shows how it is easilly to load a JDOM document:

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

/**
 * This sample program showing how to load JDOM document
 * using DOM builder.
 */

public class Test {
    public static void main(String[] args) {
        try {
            
            // a builder takes a boolean value meaning validation mode:
            DOMBuilder builder = new DOMBuilder(false);
            
            // simply load the document::
            Document document = builder.build(new java.io.File("sample.xml"));
            
            // .. do something ...
            
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}