Re: XML RSS - Unexpected End of File error
| From: | Ashley Sheridan | Date: | Thu, 08 Oct 2009 19:50:05 +0000 |
| Subject: | Re: XML RSS - Unexpected End of File error | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298780@lists.php.net to get a copy of this message | ||
On Thu, 2009-10-08 at 12:50 -0700, Jim Lucas wrote:
> Ashley Sheridan wrote:
> > On Thu, 2009-10-08 at 15:54 -0300, Jonathan Tapicer wrote:
> >
> >> Can you show the generated XML?
> >>
> >> Jonathan
> >>
> >> On Thu, Oct 8, 2009 at 3:45 PM, Ashley Sheridan
> >> <ash@ashleysheridan.co.uk> wrote:
> >>> Hi guys,
> >>>
> >>> I've knocked up a quick RSS feed on my site. It works fine in Fx 2 & 3,
> >>> in Opera it throws an error "unexpected end of file" but allows the feed
> >>> to be added anyway, and Chrome just says there's an XML error, and gives
> >>> the second from last line as the one containing the error.
> >>>
> >>> I tried adding a newline to the end of the file, but that just makes the
> >>> error message report the next line. Any ideas where I'm going wrong? The
> >>> file is using utf-8 character encoding.
> >>>
> >>> Thanks,
> >>> Ash
> >>> http://www.ashleysheridan.co.uk
> >>>
> >>>
> >>>
> >
> > Nevermind, I was having a "moment"! I'd forgotten to close the final
> > tag, as I mistook the root <rss> tag for an XML declaration instead! I
> > am a little surprised that Fx allowed it to validate correctly though!
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
>
> Well, don't forget, Fx will correct SGML and HTML that is missing tags.
>
> I think Fx would rather simply accept the incorrect format, correct it (since it
> wasn't a fatal error), and finally display what it figures you /intended/ to
> send it.
>
> I hate it when software tries to assume what I meant to say... :-(
>
I'm just used to it letting me know if I was trying to view malformed
XML. It must be a special case for RSS as it recognises the format as
being special!
Thanks,
Ash
http://www.ashleysheridan.co.uk