Like I said in the title, I was wondering whether it would be possible and how, to recursively parse an XML document and return all the nodes that have a given argument.
What I’m actually trying to do is to load and XHTML document and return all the nodes (P nodes, DIV nodes, etc.) that have a class equal to a previously defined value.
Use xpath to lookup the nodes, then just loop over:
(Not actually tested that, but it should be right.)