Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Problem getting fields out of an XPath node list

by ejc1 (Novice)
on Mar 28, 2016 at 18:57 UTC ( [id://1158973]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @nodes = $tree->findnodes('//tr');
    for my $node (@nodes) {
    ...
       last;
    }
    
  2. or download this
     #(reference, not parsing)
    <tr><th>Firstseen (UTC)</th><th>Version</th><th>Feodo C&amp;C</th><th>
    +Status</th><th>SBL</th><th>ASN</th><th>Country</th><th>Lastseen (UTC)
    +</th></tr>
    
    ...
    
    <tr bgcolor="#9d9595" onmouseover="this.style.backgroundColor='#FFA200
    +';" onmouseout="this.style.backgroundColor='#9d9595';"><td>2016-03-19
    + 23:44:36</td><td bgcolor="#58D3F7" align="center"><strong>D</strong>
    +</td><td><a href="/host/178.188.14.86/" target="_parent" title="Show 
    +more information about this Feodo C&amp;C">178.188.14.86</a></td><td 
    +bgcolor="#4f883f">offline</td><td bgcolor="#4f883f">Not listed</td><t
    +d>AS8447 TELEKOM-AT</td><td><img src="images/flags/at.gif" alt="-" ti
    +tle="AT (AT)" width="16" height="10" /> AT</td><td>2016-03-24 01:19:5
    +0</td></tr>
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1158973]
Approved by Corion
Front-paged by davies
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-04-25 15:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found