<?xml version="1.0" encoding="windows-1252"?>
<node id="1014408" title="Re: get data from xpath" created="2013-01-21 03:01:00" updated="2013-01-21 03:01:00">
<type id="11">
note</type>
<author id="779185">
tmharish</author>
<data>
<field name="doctext">
&lt;p&gt;
HTML::Miner will work too: 
&lt;/p&gt;

&lt;code&gt;
use strict                   ;
use warnings                 ;
use HTML::Miner              ;

use Data::Dump qw(dump)      ;

my $mine = new HTML::Miner( 
    CURRENT_URL =&gt; 'http://www.youtube.com/results?search_query=run+flo+rida', 
    );

my @links = @{ $mine-&gt;get_links() } ;

my @result_links;
foreach my $link ( @links ) { 

    if( $link-&gt;{ DOMAIN } =~ 'www.youtube.com' ) { 
	if( $link-&gt;{ ANCHOR } =~ /video-time/ ) { 
	    if( $link-&gt;{ ABS_URL } =~ /http:\/\/www\.youtube\.com(\/watch\?v=.*?)$/ ) { 
		push @result_links, $1 ;
	    }
	}
    }
}


dump( \@result_links ) ;
&lt;/code&gt;

&lt;p&gt;
Disclaimer: I maintain that module.
&lt;/p&gt;</field>
<field name="root_node">
1014379</field>
<field name="parent_node">
1014379</field>
</data>
</node>
