Results 1 to 12 of 12
  1. #1
    ABW Ambassador best123's Avatar
    Join Date
    July 5th, 2006
    Posts
    571
    Unhappy Please fix this bug in GoldenCan's XML Feed
    I am trying to parse your coupon XML feed one of the merchants

    I got this error: The content is not allowed in prolog.

    Then, I searched the internet on what could possibly be the problem, and came accross this explaination:

    http://forum.java.sun.com/thread.jsp...sageID=2491105

    There is a "BLANK LINE" or a "SPACE" above the prolog:
    <?xml version="1.0" encoding="utf-8" ?>

    This is causing this error, and the XML feed is not working.

    I have sent an email regarding this to GoldCan, hope they will fix this ASAP,

    cant wait to test the xml feeds

  2. #2
    ABW Ambassador best123's Avatar
    Join Date
    July 5th, 2006
    Posts
    571
    I tried to test the GoldenCan feed locally on my machine.

    I copied the XML into a file, removed the spaces before the prolog and then tried to parse it, but still got the same error.

    Probably somethings wrong in my code and not GoldenCAN's

    Their XML seems to be well-formed, IE did not complain.

    If anyone else is getting this same error, and has found a solution please post the solution here.

  3. #3
    Mr. GoldenCan
    Join Date
    May 30th, 2005
    Posts
    975
    Quote Originally Posted by best123
    I tried to test the GoldenCan feed locally on my machine.

    I copied the XML into a file, removed the spaces before the prolog and then tried to parse it, but still got the same error.

    Probably somethings wrong in my code and not GoldenCAN's

    Their XML seems to be well-formed, IE did not complain.

    If anyone else is getting this same error, and has found a solution please post the solution here.
    I am unable to find a problem with the XML feed. I do not see any space at the start. If you can give us some more information what program is giving you the error we might be able to help more.

  4. #4
    ABW Ambassador best123's Avatar
    Join Date
    July 5th, 2006
    Posts
    571
    Thank you for the quick response.

    The problem might be on my end. I am trying to do it in JSP like this:

    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
    <html>
    <head><title></title></head>
    <body>
    <c:import url="golden_can_xml_feed_url.xml" var="xml"/>
    <x:parse doc="${xml}" var="booklist" scope="application" />
    <x:out select="$booklist/GoldenCAN/MerchantInfo/MerchantName"/>
    </body>
    </html>

    may be i'm doing something wrong, that might be causing this error, I will investigate it more and see if there's a solution.

  5. #5
    ABW Ambassador best123's Avatar
    Join Date
    July 5th, 2006
    Posts
    571
    "Content is not allowed in prolog" problem is fixed, it took me like a week to get this fixed.

    For those of you who understand XML even though this error is refering to the XML prolog which is <?xml version="1.0"?> , the problem was not really in the prolog or in the XML feed, it was in the jstl configuration on my local development environment.

    I tried to use code from instructions written in 2002, 2003 while things have changed a lot now, once I followed the latest instructions for jstl everything was fixed. yay!

    Thanks for the great support from GoldenCAN.

  6. #6
    ABW Ambassador best123's Avatar
    Join Date
    July 5th, 2006
    Posts
    571
    It turns out that this problem is still there in the XML feed.

    I have not heard a word from GoldenCAN after I reported this problem.

    There are 3 hexadecimal characters before the xml prolog <?xml....

    I am unable to use the xml feeds while these special characters are present in the feed

  7. #7
    Mr. GoldenCan
    Join Date
    May 30th, 2005
    Posts
    975
    Quote Originally Posted by best123
    It turns out that this problem is still there in the XML feed.

    I have not heard a word from GoldenCAN after I reported this problem.

    There are 3 hexadecimal characters before the xml prolog <?xml....

    I am unable to use the xml feeds while these special characters are present in the feed
    Anytime we generate the XML file we are unable to see any characters before the < ?xml. Can you please save your xml file and email it to me so I can see what you are seeing?

  8. #8
    ABW Ambassador best123's Avatar
    Join Date
    July 5th, 2006
    Posts
    571
    Quote Originally Posted by GoldenCAN
    Anytime we generate the XML file we are unable to see any characters before the < ?xml. Can you please save your xml file and email it to me so I can see what you are seeing?

    You will need a HEX editor to see the special characters. The special characters will not appear in a regular editor.

    Please download a free edition of this HEX editor: http://www.softcircuits.com/cygnus/

    I will e-mail you a saved copy of an XML feed shortly.

    Then, open the XML feed file in Cygnus Hex Editor, you will notice
    3 dots immediately before the prolog <?xml

    These 3 dots are the special characters that are invisible in regular editors

    The corresponding hex code for these 3 dots is EF BB BF - (known as BOM - byte order mark) http://www.i18ngurus.com/encyclopedi...rder_mark.html

    Whatever program is generating the XML file is adding these 3 special characters before the prolog, which is causing an error on my side.

  9. #9
    Mr. GoldenCan
    Join Date
    May 30th, 2005
    Posts
    975
    Quote Originally Posted by best123
    You will need a HEX editor to see the special characters. The special characters will not appear in a regular editor.

    Please download a free edition of this HEX editor: http://www.softcircuits.com/cygnus/

    I will e-mail you a saved copy of an XML feed shortly.

    Then, open the XML feed file in Cygnus Hex Editor, you will notice
    3 dots immediately before the prolog <?xml

    These 3 dots are the special characters that are invisible in regular editors

    The corresponding hex code for these 3 dots is EF BB BF

    Whatever program is generating the XML file is adding these 3 special characters before the prolog, which is causing an error on my side.
    If you open the xml document in the internet explorer it will open as a valid xml document. i have tested it in many different ways and everything works fine.

    Please email me the xml file you are seeing and i might need some more information on exactally what are you doing and how are you trying to use the xml document.

  10. #10
    ABW Ambassador best123's Avatar
    Join Date
    July 5th, 2006
    Posts
    571
    Quote Originally Posted by GoldenCAN
    If you open the xml document in the internet explorer it will open as a valid xml document. i have tested it in many different ways and everything works fine.

    Please email me the xml file you are seeing and i might need some more information on exactally what are you doing and how are you trying to use the xml document.
    The xml file is on it's way, I e-mailed it a few minutes ago.

    The file appears correctly in Internet Explorer, because IE ignores those 3 special characters.

    I am trying to parse your XML file using Java's XML Processor called Xalan.
    It requires a clean XML file, with absolutely no special invisible characters before the prolog.

    You can see here that other people have been facing the same problem with XML files that contain the BOM characters

    http://forum.java.sun.com/thread.jsp...hreadID=491010
    Ther person who wrote the above thread is saying the same thing "When I look at them in Internet Explorer they show correctly. But when I parse them with SAX in java I get an error when I parse the file stored in UTF-8."

    Nothing else is wrong with the XML feeds.

    I saved the feed locally and removed the special characters, and then parsed it and it worked fine without any problems.

    The only problem is the BOM characters before the prolog.

  11. #11
    Mr. GoldenCan
    Join Date
    May 30th, 2005
    Posts
    975
    Quote Originally Posted by best123
    The xml file is on it's way, I e-mailed it a few minutes ago.

    The file appears correctly in Internet Explorer, because IE ignores those 3 special characters.

    I am trying to parse your XML file using Java's XML Processor called Xalan.
    It requires a clean XML file, with absolutely no special invisible characters before the prolog.

    You can see here that other people have been facing the same problem with XML files that contain the BOM characters

    http://forum.java.sun.com/thread.jsp...hreadID=491010
    Ther person who wrote the above thread is saying the same thing "When I look at them in Internet Explorer they show correctly. But when I parse them with SAX in java I get an error when I parse the file stored in UTF-8."

    Nothing else is wrong with the XML feeds.

    I saved the feed locally and removed the special characters, and then parsed it and it worked fine without any problems.

    The only problem is the BOM characters before the prolog.
    Thank you for the detail information. our developement team is looking into the issue now.

  12. #12
    ABW Ambassador best123's Avatar
    Join Date
    July 5th, 2006
    Posts
    571
    Smile Thank you so much. This problem has been fixed.
    I don't know if anyone is using xalan processor, looks like i'm the only one in this forum using it.

    Anyway, I tested the xml feeds today, and the invisible UTF-8 BOM characters are no longer there!

    Everything is working fine. and I am no longer getting the "Content is not allowed in prolog" error.

    Thank you for the great support and for resolving this issue so quickly.

  13. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. GoldenCAN XML, RSS and GetData New Features
    By GoldenCAN in forum GoldenCAN
    Replies: 29
    Last Post: November 4th, 2009, 10:24 AM
  2. RSS/XML via GoldenCan?
    By dustin999 in forum GoldenCAN
    Replies: 1
    Last Post: February 12th, 2009, 11:56 PM
  3. Wordpress 2.5.1 Bug & Security Fix & Enhancement
    By webworker in forum Blogging, Mobile and Social Media
    Replies: 6
    Last Post: April 26th, 2008, 02:13 PM
  4. Email marked as Invalid? WTF? FIX this BUG!
    By jc101 in forum Rakuten LinkShare - LS
    Replies: 47
    Last Post: October 6th, 2004, 03:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •