[jdom-interest] Failure parsing an XML-instance with SAXBuilder
Armin Pfarr
Armin.Pfarr at t-online.de
Thu Nov 2 01:47:18 PST 2000
Hello,
I tried to parse an XML-instance using jdom-b5 and Xerces 1.2.1 with the
following code-fragment
SAXBuilder builder = new SAXBuilder(true);
try {
doc = builder.build(path);
} catch(Exception ex) {
ex.printStackTrace();
}
and got the following exception
org.jdom.JDOMException: null: null
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:349)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:422)
at com.arp.xml.XMLModel.<init>(XMLModel.java:19)
at XMLTree.<init>(XMLTree.java:21)
at XMLTree.main(XMLTree.java:43)
Root cause: java.util.EmptyStackException
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:917)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:331)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:422)
at com.arp.xml.XMLModel.<init>(XMLModel.java:19)
at XMLTree.<init>(XMLTree.java:21)
at XMLTree.main(XMLTree.java:43)
I tried to submit the path with "path/file.xml", also with file:///path/file
, with a FileInputStream and with a File. In any case, the result is the
same. What surprises me most ist that the parsing with Xerces alone -
building a DOM-tree - works fine.
Any idea?
Armin
P.S.
The files that fail have a relative DTD-path in the system identifier and
the DTD's include relative external entity references.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20001102/4450fd9b/attachment.htm
More information about the jdom-interest
mailing list