// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import org.jdom.input.SAXBuilder;
import org.jdom.Document;

public class Note {
    static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
    static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
    static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
    public static void main(String[] args) throws Exception{
        SAXBuilder builder = new SAXBuilder();
        builder.setValidation(true);
        builder.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
        builder.setProperty(JAXP_SCHEMA_SOURCE, "C:/note.xsd");
        try {
            Document doc = builder.build("C:/note.xml");
        } catch(Exception e) {
            e.printStackTrace();
        }
    }
}
