dtd样式:<!DOCTYPE concept SYSTEM "http://docs.oasis-open.org/dita/v1.2/os/dtd1.2/technicalContent/dtd/concept.dtd">
dom4j读取:
1 File file=new File("address"); 2 SAXReader read=new SAXReader(); 3 //忽略dtd验证 4 read.seTFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd",false); 5 read.setEncoding("utf-8"); 6 Doucment doc=null; 7 doc=read.read(file);
原文:http://www.cnblogs.com/shizijie/p/6720267.html