This (large, so no tostring workarounds)
http://www.gutenberg.org/feeds/catalog.rdf.zipfile 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:
1 2 3 4 5
| 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 < .