Home Forums General XMetaL Discussion Getting nodes subset Reply To: Getting nodes subset

Derek Read

Reply to: Getting nodes subset

You could use Range or you could probably use DOM calls. If you use Range you would likely end up using GotoNext() or MoveToElement() or you might use ExtendTo() or possibly something else. Ranges can be easier to understand.

If you are using DOM calls you could try nextSibling.

I guess which you use depends on whether you need to grab the whole mess of nodes at once or whether you need to select the entire thing to do something with it (surround it with another element for example). In that case it might be easier, or even necessary, to use Range.

For a DOM example you may wish to view the sample code in this Programmers Guide topic: