in reply to how do i parse xml webpage in perl

XML::Simple doesn't work from a URL-- it doesn't know how to find something on the web by itself. You need to use something like LWP to get the web page first and put it in a string or file, then do your stuff with XML::Simple

One word of warning, is that unless you know the XML is well formed, you might be happier using an HTML processor, like HTML::Treebuilder or HTML::TokeParser. XML parsers are supposed to die horribly if they get something that's badly formed, but the HTML parsers are usually more forgiving.

Replies are listed 'Best First'.
Re^2: how do i parse xml webpage in perl
by sauoq (Abbot) on May 08, 2012 at 04:09 UTC
    HTML parsers are usually more forgiving.

    Yeah. More forgiving at parsing HTML.

    XML is not HTML. And you usually don't want parsing XML to be that forgiving.

    -sauoq
    "My two cents aren't worth a dime.";
      I didn't notice that he actually was pulling down an XML file-- I thought he was trying to parse a webpage with an XML parser..