[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
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|