I tested getContentAsDOM and it works fine with my files. However, it see=
that the "Premature end of file" exception is generated by the DOM parser=
Since the XMLRPC server just returns the content as binary data, the data=
to be parsed in method getContentAsDOM. It thus seems that the document=20
fragment received by getNextResult is somehow incomplete. You should poss=
check the returned string by calling getContent(). Does it look ok?
On Tuesday 28 January 2003 18:07, Bruno Chatel wrote:
> 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=
> of file. at
> 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=
> For information, this routine did not have any errors with exist 0.8.1.