日期:2014-05-16  浏览次数:20777 次

apache Digester 从本地加载dtd文件

?

Digester digester = initDigester();

String dtd =?"/com/test/test.dtd";

ClassPathResource res = new ClassPathResource(dtd);

String?doctypePublic = "?-//Apache Software Foundation//DTD Struts Configuration 1.0//EN?";

digester.register(doctypePublic, res.getURL().toString());

?