LibXMLi example  

<td class="playername">UnnamedPlayer</td>
foreach my $td ( $dom->findnodes(q{//td[@class='playername']}) ) {
    my $element = $td->toString;
    my $class = $td->getAttribute('class');
    my $content = $td->textContent;
    print "element = '$element'\nclass = '$class'\ncontent = '$content'\n";
}
element = '<td class="playername">UnnamedPlayer</td>'
class = 'playername'
content = 'UnnamedPlayer'