jamesclarke jamesclarke - 1 month ago 21
C# Question

JQuery style dom manipulation in C#

I'm trying to perform some DOM manipulation, mainly selection of all child elements of a parent element such as a

div
of
id=...
or
class=...
. Is there some lightweight method of doing this?

Answer

Something like HTML Agility Pack is probably your best bet.

The syntax isn't as nicely fluent as jQuery, but it's pretty good.