Example usage for org.hibernate.internal.util.xml DTDEntityResolver DTDEntityResolver

List of usage examples for org.hibernate.internal.util.xml DTDEntityResolver DTDEntityResolver

Introduction

In this page you can find the example usage for org.hibernate.internal.util.xml DTDEntityResolver DTDEntityResolver.

Prototype

DTDEntityResolver

Source Link

Usage

From source file:org.cgiar.ccafs.ap.util.ClientRepository.java

License:Open Source License

protected static Element getDocumentRoot(InputStreamReader stream) {
    try {/*w  w  w  . jav  a 2 s .  c om*/
        SAXReader saxReader = new SAXReader();
        saxReader.setEntityResolver(new DTDEntityResolver());
        saxReader.setMergeAdjacentText(true);
        return saxReader.read(stream).getRootElement();
    } catch (DocumentException de) {
        throw new RuntimeException(de);
    }
}