OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Problem parsing a RSS file with XML parser

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: Re: [xml-dev] Problem parsing a RSS file with XML parser
  • From: Pelle Nilsson <pellenilsson@fastmail.fm>
  • Date: Sun, 12 Sep 2004 00:20:05 +0200
  • In-reply-to: <20040909121813.DF10715FDE2@macintosh.inf.ed.ac.uk>
  • References: <20040908223551.GD800@gandalf> <20040909121813.DF10715FDE2@macintosh.inf.ed.ac.uk>
  • User-agent: Mutt/1.5.6+20040818i

Thanks! I could now solve the problem by configuring PHP to send a
HTTP_USER_AGENT header. It's probably good practice to that always.

/Pelle


On Thu, Sep 09, 2004 at 01:18:13PM +0100, Richard Tobin wrote:
> I replied to this on xml-dev yesterday but my message doesn't seem to
> have got through.  Here it is:
> 
> In article <20040908223551.GD800@gandalf>,
> Pelle Nilsson <pellenilsson@fastmail.fm> wrote:
> 
> >I am trying to validate a RSS 0.9 document (not created by myself)
> >with PHP's DOM parser. The parser can't parse the file,
> >because it mistakes the doctype-tag for the root tag.
> 
> No, that's not the problem.
> 
> The problem is that the HTTP server is sending this back before the
> document:
> 
>  <br />
>  <b>Warning</b>:  get_browser(): HTTP_USER_AGENT variable is not set,
>  cannot determine user agent name in <b>/usr/rss/php/config.inc</b> on
>  line <b>38</b><br />
>  <br />
>  <b>Warning</b>:  Cannot modify header information - headers already sent
>  by (output started at /usr/rss/php/config.inc:38) in
>  <b>/usr/rss/php/backend.php</b> on line <b>3</b><br />
> 
> Presumably you aren't seeing this when you look at it in a browser
> because in that case the HTTP request contains a user-agent header.
> 
> If you fetch the document with wget and validate it, it's fine.
> 
> -- Richard




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS