0

I have a string for HTML table, which looks like

string = "<table><tr><td style="color:#FFF">12</td><td>16</td><td>65</td><td>45</td></tr>
          <tr><td width="20px;">2</td><td>56</td><td>34</td><td style="background      color:Red;">98</td></tr></table>";

I want to iterate through this table row by row, cell by cell and I DONT want to include the styling and stuff...

Can you show me a small example on how to do this in asp.net & c#.

1

1 Answer 1

1

I suggest using an HTML parser like the HTML Agility Pack - it will parse this fragment and let you query it using XPath or LINQ to XML syntax.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.