views:

46

answers:

2

Hi,

I'm trying to perform some dom manipulation, mainly selection of all clild elements of a parent element such as a div of id=... or class=... Is there some lightweight method of doing this.

Many thanks,

James

+1  A: 

Something like HTML Agility Pack is probably your best bet.

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

LukeH
Great, thank you!
jamesclarke
A: 

If you are trying to do this server side, then HTML Agility Pack is your best bet. For client side you can use jquery selectors. For example $('#id > *') will get all children of an element with an id="id" or $('.class > *') for classes.

Yuriy Faktorovich