I am taking a stab at html agility pack and having trouble finding the right way to go about this. For example: I want to get the content of second span tag:
htmlDoc.DocumentNode.SelectSingleNode("//div[@style='color:#000000; padding: 10px;']/table/tr[1]/td[1]/span[2]").InnerText;
here is my html file that I want to parse using HTML AGILITY PACK:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body onload="oload()" onunload="Unload()">
<div id="content">
<table width="100%">
<tr>
<td width="48%" valign="top">
<fieldset style="border:1px solid #ccc;color:#ccc;margin:0;padding:0;">
<legend style="color:#ccc;margin:0 0 0 10px;padding:0 3px;">Profile Information</legend>
<div style="color:#000000; padding: 10px;">
<br />
Name Surname:<br />
<span style="font-size:18px;">John Doe</span>
<br /><br /><br />
Address:<br />
<span style="font-size:18px;">706 test<br>NY 14013</span>
<br /><br /><br />
</div>
</fieldset>
<br />
</td>
<td width="52%" align="right" valign="top">
</td>
</tr>
</table>
</div>
</body>
</html>