Having a bit of trouble with what should be an easy task. I'm trying to extract the text from the node where class='song_artist', but I just can't seem to figure it out. My HTML snippet is below:
<tr id='0000moe2008-05-23d01t01_vbr' class='row-even'><td class='song_name'>Captain America<h3> (00:00)</h3></td><td class='song_artist'>moe.</td><td class='song_date'>2008-05-23</td><td class='song_location'>Jones Beach, VA</td></td><td class='song_extras'></td></tr>
<tr id='00011-01_Rock_And_Roll_Part_2' class='row-odd'><td class='song_name'>Rock and Roll part 2<h3> (00:00)</h3></td><td class='song_artist'>Phish</td><td class='song_date'>1998-11-20</td><td class='song_location'>Jones Beach, VA</td></td><td class='song_extras'></td></tr>
<tr id='00021-03_Quinn_The_Eskimo' class='row-even'><td class='song_name'>Quinn the Eskimo<h3> (00:00)</h3></td><td class='song_artist'>Phish</td><td class='song_date'>1998-11-20</td><td class='song_location'>Jones Beach, VA</td></td><td class='song_extras'></td></tr>
I have access to the <tr>
element but can't navigate to the <td>
that contains the data I need. I've tried using
parent.firstChild.nextSibling.data
, but haven't had any success. Any expert JavaScript developers who can provide some guidance?