[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Problem parsing a RSS file with XML parser

  • To: xml-dev@l...
  • Subject: Re: Problem parsing a RSS file with XML parser
  • From: Pelle Nilsson <pellenilsson@f...>
  • Date: Sun, 12 Sep 2004 00:20:05 +0200
  • In-reply-to: <20040909121813.DF10715FDE2@m...>
  • References: <20040908223551.GD800@gandalf> <20040909121813.DF10715FDE2@m...>
  • User-agent: Mutt/1.5.6+20040818i

wget rss
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@f...> 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.