I am parsing html tabular information with the help of the html agility pack. Now First I am finding the rows in that table like
var rows = table.Descendants("tr");
then I find the cell data for each row like
foreach(var row in rows)
{
string rowInnerText = row.InnerText;
}
That gives me the cell data.But with no spaces between them like NameAdressPhone No but I want the innertext like Name Address Phone No means where there is td tag I want to keep there one space between different column cell.
Here is an idea, however completely untested:
This should give you en
IEnumerable<string>where each contained element represents one row from the table, in the format described in your question. If you actually need your loop over the rows for other processing, keep yourforeachloop and use the LINQ magic in its body: