为什么这样用不行?让dom分析一个Inputstream
Appla 2003-10-29 02:38:32 parse不是可以使用InputStream做参数的吗?
cont的inbound是公共的成员,InputStream类型的
if(cont != null) {
// try to get input string
try {
document = builder.parse(cont.inbound); 《--这一行报错
}
catch (IOException ex2) {}
catch (SAXException ex2) {}
}
报错:
"ThCommThread.java": incompatible types;found : org.w3c.dom.Document,required: javax.xml.parsers.DocumentBuilder at line 42, column 81