本文发表在 rolia.net 枫下论坛输入的XML 的文挡看起来是完整的(在IE 里可以正常显示), 把该XML 文档的URI 传给DOCUMENTBUILDER 类对象PARASE 方法的时候,得到如下的EXCEPTION.
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3339)
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3327)
at org.apache.crimson.parser.Parser2.maybePI(Parser2.java:1107)
at org.apache.crimson.parser.Parser2.maybeMisc(Parser2.java:1233)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:621)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
at iqquest.MainFrame.<init>(MainFrame.java:49)
at iqquest.Main.main(Main.java:10)
部分代码如下:
DocumentBuilderFactory df =DocumentBuilderFactory.newInstance();
DocumentBuilder db=df.newDocumentBuilder();
Document doc=null;
uri=new String(Global.HostURL +Global.GetMethodPath+"?sSql="+sSql);
try{
doc = db.parse(uri);
// doc = db.parse((InputStream)inputStream);
}
catch(SAXParseException es)
{
// System.out.println(es);
es.printStackTrace();
}更多精彩文章及讨论,请光临枫下论坛 rolia.net
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3339)
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3327)
at org.apache.crimson.parser.Parser2.maybePI(Parser2.java:1107)
at org.apache.crimson.parser.Parser2.maybeMisc(Parser2.java:1233)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:621)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
at iqquest.MainFrame.<init>(MainFrame.java:49)
at iqquest.Main.main(Main.java:10)
部分代码如下:
DocumentBuilderFactory df =DocumentBuilderFactory.newInstance();
DocumentBuilder db=df.newDocumentBuilder();
Document doc=null;
uri=new String(Global.HostURL +Global.GetMethodPath+"?sSql="+sSql);
try{
doc = db.parse(uri);
// doc = db.parse((InputStream)inputStream);
}
catch(SAXParseException es)
{
// System.out.println(es);
es.printStackTrace();
}更多精彩文章及讨论,请光临枫下论坛 rolia.net