我是这样解决的: DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setValidating(true);
dbf.setIgnoringComments(true);
DocumentBuilder db = dbf.newDocumentBuilder();
InputSource is = new InputSource(new java.io.ByteArrayInputStream(xmlStr.getBytes()));
Document doc = db.parse(is);
DocumentImpl docImpl = (DocumentImpl) doc;
dbf.setValidating(true);
dbf.setIgnoringComments(true);
DocumentBuilder db = dbf.newDocumentBuilder();
InputSource is = new InputSource(new java.io.ByteArrayInputStream(xmlStr.getBytes()));
Document doc = db.parse(is);
DocumentImpl docImpl = (DocumentImpl) doc;
解决方案 »
- spring opensessioninviewIntercepter
- 100 分求方案!
- Hql语句不出现错误!
- tomcat配置了load-on-startup,然后有点问题
- tomcat在系统服务模式下运行与在控制台模式下运行有什么区别?请指教
- 我在客户端如何可以取得服务器端的最新数据(前10条),除了定时刷新的方法,还有别的方法吗?而且数据量较大,要保证速度。希望各位大侠、高手给写建议。
- 我做的登陆系统出的问题
- log4j的日志——诡异事件
- AXIS的例子,怎样解析ELEMENT?
- 请问EJB-QL的LIKE的用法
- 急~!!关于struts+freemarker的问题??
- C/S------->B/S数据通信
怎么给一个DOM设置DTD验证属性呀,也就是说,有没有方法或者属性设置给一个DOM加上这么一句话:<!DOCTYPE OMSInfo SYSTEM "d:/test.dtd">