public Document loadDocument(Resource file) throws SAXException, IOException {
  DOMParser parser=new DOMParser();
  InputStream in=null;
  try {
    in=file.getInputStream();
    InputSource source=new InputSource(in);
    parser.parse(source);
  }
  finally {
    IOUtil.closeEL(in);
  }
  return parser.getDocument();
}

public Document loadDocument ( Resource file ) throws SAXException , IOException { DOMParser parser = new DOMParser ( ) ; InputStream in = null ; try { in = file . getInputStream ( ) ; InputSource source = new InputSource ( in ) ; parser . parse ( source ) ; } finally { IOUtil . closeEL ( in ) ; } return parser . getDocument ( ) ; }
load a xml document as dom representation
