Oh my, how silly of me. The page has moved to http://www.weather.gov/xml/current_obs/KAGC.xml ! Firefox simply follows the redirect.
Thanks for the putStrLn suggestion, George. On Tue, Nov 4, 2008 at 5:28 PM, George Pollard <[EMAIL PROTECTED]> wrote: > On Tue, 2008-11-04 at 17:04 -0800, Brian Troutwine wrote: >> > [EMAIL PROTECTED]:~ >> > $ ./weather >> > >> > error: ""<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0/..."" (line 1, >> > column 16): >> > unexpected "P" >> > expecting white space, "[" or ">" >> > >> > Unable to parse weather data. >> >> Woops. Would someone be so kind as to explain why this is failing? I'm >> at rather a loss. > > The HXT parser is stopping because it's expecting XML not HTML, which is > what you're receiving for some reason. > > I just loaded up the weather URL in Firefox > [http://www.weather.gov/xml/current_obs/KAGC.xml] and it is XML... Is it > possible that you are behind a proxy that is blocking the page? (I can't > run the code at the moment; cleaning out Haskell packages to upgrade to > 6.10.) > > You could try printing out the contents of the page as well (putStrLn > doc) so you can see the rest of the HTML that `weather` is receiving. > -- Brian _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
