Since the child nodes are published and this can be on any level for any number of items I think it's easier to just work with the result set. And recursively go over each level, and remove any Node where the Parent NodeID is not part of the result set.
I assume this doesn't change to often, so adding caching and appropriate dependencies should suffice.