Author: barkster | Posted on: 11/11/2008 7:26:26 AM | Views : 317

Is there a way to parse HTML by getElementsByClassName?  I have a javascript that does it but I would like to convert this to c#  and do it server side but cannot find any information on parsing html by class name.  Thanks

var test = document.getElementsByClassName("listing_name");
var theData = new Array();

for (var i = 0; i < test.length; i++) {
theData[i] = new Array();
theData[i][0] = test[i].textContent;
theData[i][1] = test[i].parentNode.nextSibling.innerHTML;
theData[i][2] = test[i].parentNode.nextSibling.nextSibling.innerHTML;
}

...

Go to the complete details ...