GNOME Bugzilla – Bug 776482
raitv: XML declaration allowed only at the start of the document
Last modified: 2017-01-03 10:40:43 UTC
1. Open grilo-test-ui in terminal 2. Rai -> Most Popular -> Black and White. dev@unstable:~/source/git/totem$ grilo-test-ui-0.3 Entity: line 2: parser error : XML declaration allowed only at the start of the document <?xml version="1.0" encoding="UTF-8"?><CLASSIFICAVISTI> ^ Entity: line 2: parser error : XML declaration allowed only at the start of the document <?xml version="1.0" encoding="UTF-8"?><CLASSIFICAVISTI> ^ Entity: line 2: parser error : XML declaration allowed only at the start of the document <?xml version="1.0" encoding="UTF-8"?><CLASSIFICAVISTI>
dev@unstable:~/source/git/totem$ gdb $(which grilo-test-ui-0.3) .. .. (gdb) bt 0
+ Trace 237018
(gdb) p content $13 = (gchar *) 0x555556434780 "\n<?xml version=\"1.0\" encoding=\"UTF-8\"?><CLASSIFICAVISTI>\n<numgiorni>7</numgiorni>\n<content>\n<dominio>RaiTv</dominio>\n<localid>ContentItem-a8e6d342-f1cc-423e-a588-02b360897c9d</localid>\n<numvisite>1969"... The XML document should start with: <?xml version=\"1.0\" encoding=\"UTF-8\"?> Whitespace and newlines before that is not acceptable. It would help to trim leading whitespace / newlines from content.
commit 063064bceb777dc3d8dcd518c39d5ce404e30c2b Author: Bastien Nocera <hadess@hadess.net> Date: Tue Jan 3 11:38:14 2017 +0100 raitv: Work-around leading linefeed at start of XML 1. Open grilo-test-ui in terminal 2. Rai -> Most Popular -> Black and White. Entity: line 2: parser error : XML declaration allowed only at the start of the document <?xml version="1.0" encoding="UTF-8"?><CLASSIFICAVISTI> Removing the leading linefeed fixes that problem. https://bugzilla.gnome.org/show_bug.cgi?id=776482