From: Wolfgang M. <me...@if...> - 2003-01-30 08:14:44
|
Hi, I tested getContentAsDOM and it works fine with my files. However, it see= ms=20 that the "Premature end of file" exception is generated by the DOM parser= =2E=20 Since the XMLRPC server just returns the content as binary data, the data= has=20 to be parsed in method getContentAsDOM. It thus seems that the document=20 fragment received by getNextResult is somehow incomplete. You should poss= ibly=20 check the returned string by calling getContent(). Does it look ok? Best Regards, Wolfgang On Tuesday 28 January 2003 18:07, Bruno Chatel wrote: > Hi, > > I have a mysterious exception when getting a XMLresource content as > DOM from a XPATH query. > > Exception in thread "main" org.xmldb.api.base.XMLDBException: Premature= end > of file. at > org.exist.xmldb.XMLResourceImpl.getContentAsDOM(XMLResourceImpl.java:12= 7) > at fr.chadocs.query.xpath.getNextResult(xpath.java:93) > > It seems to be a SAXException. > > It appends on the getContentAsDOM() call of the first iteration (first > call of .nextResource() on the ResourceIterator). > > When I use the example query XSP interface, the same XPATH query gives > corect results without any exception (same result count and all results= are > available). > > For information, this routine did not have any errors with exist 0.8.1. |