Page 1 of 1

BUG/FIX: XML Parser / UTF-8 with BOM in prolog

PostPosted: Fri Jul 14, 2017 11:18 pm
by bkylie
Hi,

Had an issue with a podcast feed:

Code: Select all
Error org.jdom.input.JDOMParseException: Error on line 1: Content is not allowed in prolog.


The xmllint reports the feed xml as compliant with one minor warning not related to the prolog.

Did a little digging and it sounded a bit like this (which uses the SAXParser but seems functionally similar):

http://mark.koli.ch/resolving-orgxmlsax ... -in-prolog

Analysis of the feed via a hex editor did confirm a UTF-8 byte-order mark:
Code: Select all
EF BB BF
before the xml tag. The suggested handling in the above article would appear to resolve it and make podcast ingest less likely to break.