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
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
Something like HTML Agility Pack is probably your best bet.
The syntax isn't as nicely fluent as jQuery, but it's pretty good.
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.