This seems to be an Atom feed plus a few extensions. XML::Atom might bring you joy.

Update: OK, here's a quick example that pulls out the search results. (I needed first to fix the unescaped ampersands and add the missing namespace declarations.)

use strict; use warnings; use XML::LibXML; use XML::Atom::Feed; my $feed = XML::Atom::Feed->new(\*DATA); foreach my $entry ($feed->entries) { printf( "Got: %s (%s)\n", $entry->content->elem->findvalue('./m:properties/d:Title'), $entry->content->elem->findvalue('./m:properties/d:Url'), ); } __DATA__ <feed xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices +" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices +/metadata" xmlns="http://www.w3.org/2005/Atom" > <title type="text">xbox</title> <subtitle type="text">Bing Web Search</subtitle> <id>https://api.datamarket.azure.com/Data.ashx/Bing/SearchWeb/v1/W +eb?Query='xbox'&amp;Market='en-GB'&amp;$top=3</id> <rights type="text"/> <updated>2013-03-13T19:01:31Z</updated> <link rel="next" href="https://api.datamarket.azure.com/Data.ashx/ +Bing/SearchWeb/v1/Web?Query='xbox'&amp;Market='en-GB'&amp;$skip=3&amp +;$top=3"/> <entry> <id>https://api.datamarket.azure.com/Data.ashx/Bing/SearchWeb/ +v1/Web?Query='xbox'&amp;Market='en-GB'&amp;$skip=0&amp;$top=1</id> <title type="text">WebResult</title> <updated>2013-03-13T19:01:31Z</updated> <content type="application/xml"> <m:properties> <d:ID m:type="Edm.Guid">13bfd262-8460-4487-827f-465643 +cb7</d:ID> <d:Title m:type="Edm.String">Xbox 360 - Xbox.com</d:Ti +tle> <d:Description m:type="Edm.String">Your ultimate Xbox +360 ....</d:Description> <d:DisplayUrl m:type="Edm.String">www.xbox.com</d:Disp +layUrl> <d:Url m:type="Edm.String">http://www.xbox.com/</d:Url +> </m:properties> </content> </entry> <entry> <id>https://api.datamarket.azure.com/Data.ashx/Bing/SearchWeb/ +v1/Web?Query='xbox'&amp;Market='en-GB'&amp;$skip=1&amp;$top=1</id> <title type="text">WebResult</title> <updated>2013-03-13T19:01:31Z</updated> <content type="application/xml"> <m:properties> <d:ID m:type="Edm.Guid">daf94bdf-e59b-4e17-8c06-62a8b4 +ff8</d:ID> <d:Title m:type="Edm.String">Xbox UK Home</d:Title> <d:Description m:type="Edm.String">For UK Xbox gamers +...</d:Description> <d:DisplayUrl m:type="Edm.String">www.xbox.com/GB</d:D +isplayUrl> <d:Url m:type="Edm.String">http://www.xbox.com/GB</d:U +rl> </m:properties> </content> </entry> </feed>
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

In reply to Re: Parsing XML by tobyink
in thread Parsing XML by DanielSpaniel

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.