[xml] XPath on a subtree

I quite often need to find a set of nodes using an XPath expression, then for
each node in that set, do something, then search for zero or more children of
that node.

What I'm interested in is whether the second search can be done with XPath
too. Can I somehow search for children of a particular node? An obvious
way would be to use an XPath context based on that node, but you only
seem to be able to create a context based on a document tree.

Right now, I am manually iterating through children of the node concerned.
That's fine, but only works well when I'm searching for immediate children,
and is obviously not as flexible as XPath.

I can't help feeling I'm missing something here.

Alex Bligh

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]