Why is the openjdk Stax Parser failing reading a rdf file?

This (large, so no tostring workarounds)
http://www.gutenberg.org/feeds/catalog.rdf.zip
file is throwing this exception:
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:591)
(my code)…

when i try to read it with the normal:

        XMLInputFactory f = XMLInputFactory.newInstance();
        XMLStreamReader r = f.createXMLStreamReader(s);
        while(r.hasNext()) {
            System.out.println(r.next());
        }

No byte order marks i can see before the < .

ZipInputStream needs to call getNextEntry to position its cursor :stuck_out_tongue:

If you don’t it just gives the same (illegal) byte, over, and over and over again.

Why don’t you GZ it, instead of ZIP?

It’s not mine. It’s the Gutemberg project that provides it, this page in fact: