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 < .